Mercurial > hg > svgui
comparison view/View.cpp @ 834:9ad718fdc369
Add getInteractionLayer() and some docs
author | Chris Cannam |
---|---|
date | Tue, 02 Sep 2014 10:31:23 +0100 |
parents | 8bb9320f78a4 |
children | 7792b7667f74 |
comparison
equal
deleted
inserted
replaced
833:57d943a61943 | 834:9ad718fdc369 |
---|---|
630 this, SLOT(modelReplaced())); | 630 this, SLOT(modelReplaced())); |
631 | 631 |
632 update(); | 632 update(); |
633 | 633 |
634 emit propertyContainerRemoved(layer); | 634 emit propertyContainerRemoved(layer); |
635 } | |
636 | |
637 Layer * | |
638 View::getInteractionLayer() | |
639 { | |
640 Layer *sl = getSelectedLayer(); | |
641 if (sl && !(sl->isLayerDormant(this))) { | |
642 return sl; | |
643 } | |
644 if (!m_layers.empty()) { | |
645 int n = getLayerCount(); | |
646 while (n > 0) { | |
647 --n; | |
648 Layer *layer = getLayer(n); | |
649 if (!(layer->isLayerDormant(this))) { | |
650 return layer; | |
651 } | |
652 } | |
653 } | |
654 return 0; | |
635 } | 655 } |
636 | 656 |
637 Layer * | 657 Layer * |
638 View::getSelectedLayer() | 658 View::getSelectedLayer() |
639 { | 659 { |