changeset 839:757b7baac614

Return getSelectedLayer to being able to return a dormant layer -- if that isn't allowed, then getInteractionLayer is what you want
author Chris Cannam
date Tue, 02 Sep 2014 16:12:40 +0100
parents b350de0ec8f7
children d843e6275d0f
files view/View.cpp
diffstat 1 files changed, 1 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/view/View.cpp	Tue Sep 02 16:10:10 2014 +0100
+++ b/view/View.cpp	Tue Sep 02 16:12:40 2014 +0100
@@ -670,15 +670,7 @@
 View::getSelectedLayer()
 {
     if (m_haveSelectedLayer && !m_layerStack.empty()) {
-        int n = getLayerCount();
-        while (n > 0) {
-            --n;
-            Layer *layer = getLayer(n);
-            if (!(layer->isLayerDormant(this))) {
-                return layer;
-            }
-        }
-        return 0;
+        return getLayer(getLayerCount() - 1);
     } else {
 	return 0;
     }