changeset 315:c30a7cd29f4a

* Make drop behave more sensibly (replace current pane)
author Chris Cannam
date Wed, 17 Oct 2007 12:58:45 +0000
parents 7b96a3261e1c
children c0b9eec70639
files view/View.cpp view/View.h
diffstat 2 files changed, 26 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/view/View.cpp	Tue Oct 16 18:42:51 2007 +0000
+++ b/view/View.cpp	Wed Oct 17 12:58:45 2007 +0000
@@ -1051,6 +1051,28 @@
     return 0;
 }
 
+View::ModelSet
+View::getModels()
+{
+    ModelSet models;
+
+    for (int i = 0; i < getLayerCount(); ++i) {
+
+        Layer *layer = getLayer(i);
+
+        if (dynamic_cast<TimeRulerLayer *>(layer)) {
+            continue;
+        }
+
+        if (layer && layer->getModel()) {
+            Model *model = layer->getModel();
+            models.insert(model);
+        }
+    }
+
+    return models;
+}
+
 int
 View::getAlignedPlaybackFrame() const
 {
--- a/view/View.h	Tue Oct 16 18:42:51 2007 +0000
+++ b/view/View.h	Wed Oct 17 12:58:45 2007 +0000
@@ -30,6 +30,7 @@
 class ViewPropertyContainer;
 
 #include <map>
+#include <set>
 
 /**
  * View is the base class of widgets that display one or more
@@ -252,6 +253,9 @@
     size_t getModelsStartFrame() const;
     size_t getModelsEndFrame() const;
 
+    typedef std::set<Model *> ModelSet;
+    ModelSet getModels();
+
     //!!!
     int getAlignedPlaybackFrame() const;