# HG changeset patch # User Chris Cannam # Date 1409670760 -3600 # Node ID 757b7baac6149614e81f2078b90986a92c13959d # Parent b350de0ec8f7705ea5e8f5cd214b0b6faa09da3c Return getSelectedLayer to being able to return a dormant layer -- if that isn't allowed, then getInteractionLayer is what you want diff -r b350de0ec8f7 -r 757b7baac614 view/View.cpp --- 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; }