comparison view/View.cpp @ 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 532302d04571
comparison
equal deleted inserted replaced
838:b350de0ec8f7 839:757b7baac614
668 668
669 Layer * 669 Layer *
670 View::getSelectedLayer() 670 View::getSelectedLayer()
671 { 671 {
672 if (m_haveSelectedLayer && !m_layerStack.empty()) { 672 if (m_haveSelectedLayer && !m_layerStack.empty()) {
673 int n = getLayerCount(); 673 return getLayer(getLayerCount() - 1);
674 while (n > 0) {
675 --n;
676 Layer *layer = getLayer(n);
677 if (!(layer->isLayerDormant(this))) {
678 return layer;
679 }
680 }
681 return 0;
682 } else { 674 } else {
683 return 0; 675 return 0;
684 } 676 }
685 } 677 }
686 678