# HG changeset patch # User Chris Cannam # Date 1409667623 -3600 # Node ID 1384485650e3fa55b739fc81b43807beb51ab536 # Parent 7792b7667f74bd5cf157f86d280bfba64a7f22d7 Populate the fixed order layer list diff -r 7792b7667f74 -r 1384485650e3 view/View.cpp --- a/view/View.cpp Tue Sep 02 14:47:04 2014 +0100 +++ b/view/View.cpp Tue Sep 02 15:20:23 2014 +0100 @@ -532,6 +532,7 @@ SingleColourLayer *scl = dynamic_cast(layer); if (scl) scl->setDefaultColourFor(this); + m_fixedOrderLayers.push_back(layer); m_layerStack.push_back(layer); QProgressBar *pb = new QProgressBar(this); @@ -599,7 +600,18 @@ delete m_cache; m_cache = 0; - for (LayerList::iterator i = m_layerStack.begin(); i != m_layerStack.end(); ++i) { + for (LayerList::iterator i = m_fixedOrderLayers.begin(); + i != m_fixedOrderLayers.end(); + ++i) { + if (*i == layer) { + m_fixedOrderLayers.erase(i); + break; + } + } + + for (LayerList::iterator i = m_layerStack.begin(); + i != m_layerStack.end(); + ++i) { if (*i == layer) { m_layerStack.erase(i); if (m_progressBars.find(layer) != m_progressBars.end()) {