Mercurial > hg > svgui
comparison view/View.cpp @ 836:1384485650e3
Populate the fixed order layer list
author | Chris Cannam |
---|---|
date | Tue, 02 Sep 2014 15:20:23 +0100 |
parents | 7792b7667f74 |
children | 6c4cab21e387 |
comparison
equal
deleted
inserted
replaced
835:7792b7667f74 | 836:1384485650e3 |
---|---|
530 m_cache = 0; | 530 m_cache = 0; |
531 | 531 |
532 SingleColourLayer *scl = dynamic_cast<SingleColourLayer *>(layer); | 532 SingleColourLayer *scl = dynamic_cast<SingleColourLayer *>(layer); |
533 if (scl) scl->setDefaultColourFor(this); | 533 if (scl) scl->setDefaultColourFor(this); |
534 | 534 |
535 m_fixedOrderLayers.push_back(layer); | |
535 m_layerStack.push_back(layer); | 536 m_layerStack.push_back(layer); |
536 | 537 |
537 QProgressBar *pb = new QProgressBar(this); | 538 QProgressBar *pb = new QProgressBar(this); |
538 pb->setMinimum(0); | 539 pb->setMinimum(0); |
539 pb->setMaximum(0); | 540 pb->setMaximum(0); |
597 } | 598 } |
598 | 599 |
599 delete m_cache; | 600 delete m_cache; |
600 m_cache = 0; | 601 m_cache = 0; |
601 | 602 |
602 for (LayerList::iterator i = m_layerStack.begin(); i != m_layerStack.end(); ++i) { | 603 for (LayerList::iterator i = m_fixedOrderLayers.begin(); |
604 i != m_fixedOrderLayers.end(); | |
605 ++i) { | |
606 if (*i == layer) { | |
607 m_fixedOrderLayers.erase(i); | |
608 break; | |
609 } | |
610 } | |
611 | |
612 for (LayerList::iterator i = m_layerStack.begin(); | |
613 i != m_layerStack.end(); | |
614 ++i) { | |
603 if (*i == layer) { | 615 if (*i == layer) { |
604 m_layerStack.erase(i); | 616 m_layerStack.erase(i); |
605 if (m_progressBars.find(layer) != m_progressBars.end()) { | 617 if (m_progressBars.find(layer) != m_progressBars.end()) { |
606 delete m_progressBars[layer].bar; | 618 delete m_progressBars[layer].bar; |
607 delete m_progressBars[layer].cancel; | 619 delete m_progressBars[layer].cancel; |