Mercurial > hg > svgui
comparison view/View.cpp @ 733:87512dacc4bd tonioni
Do not return a dormant layer as the currently-selected layer
author | Chris Cannam |
---|---|
date | Wed, 05 Mar 2014 13:44:10 +0000 |
parents | 596414d20ef0 |
children | fe59d97750ba |
comparison
equal
deleted
inserted
replaced
732:558c71a802d4 | 733:87512dacc4bd |
---|---|
624 | 624 |
625 Layer * | 625 Layer * |
626 View::getSelectedLayer() | 626 View::getSelectedLayer() |
627 { | 627 { |
628 if (m_haveSelectedLayer && !m_layers.empty()) { | 628 if (m_haveSelectedLayer && !m_layers.empty()) { |
629 return getLayer(getLayerCount() - 1); | 629 int n = getLayerCount(); |
630 while (n > 0) { | |
631 --n; | |
632 Layer *layer = getLayer(n); | |
633 if (!(layer->isLayerDormant(this))) { | |
634 return layer; | |
635 } | |
636 } | |
637 return 0; | |
630 } else { | 638 } else { |
631 return 0; | 639 return 0; |
632 } | 640 } |
633 } | 641 } |
634 | 642 |