# HG changeset patch # User Chris Cannam # Date 1192625925 0 # Node ID c30a7cd29f4ac94447fc0cb823c6d13e0a424fcf # Parent 7b96a3261e1c96a5a0af33a947080c59f348af08 * Make drop behave more sensibly (replace current pane) diff -r 7b96a3261e1c -r c30a7cd29f4a view/View.cpp --- 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(layer)) { + continue; + } + + if (layer && layer->getModel()) { + Model *model = layer->getModel(); + models.insert(model); + } + } + + return models; +} + int View::getAlignedPlaybackFrame() const { diff -r 7b96a3261e1c -r c30a7cd29f4a view/View.h --- 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 +#include /** * 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 ModelSet; + ModelSet getModels(); + //!!! int getAlignedPlaybackFrame() const;