changeset 837:6c4cab21e387

Use fixed-order layer list for property container enumeration. Fixes habit of the layer property tabs to jump about when adding a new layer.
author Chris Cannam
date Tue, 02 Sep 2014 15:25:27 +0100
parents 1384485650e3
children b350de0ec8f7
files view/View.cpp view/View.h
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/view/View.cpp	Tue Sep 02 15:20:23 2014 +0100
+++ b/view/View.cpp	Tue Sep 02 15:25:27 2014 +0100
@@ -164,7 +164,7 @@
 int
 View::getPropertyContainerCount() const
 {
-    return m_layerStack.size() + 1; // the 1 is for me
+    return m_fixedOrderLayers.size() + 1; // the 1 is for me
 }
 
 const PropertyContainer *
@@ -178,7 +178,7 @@
 View::getPropertyContainer(int i)
 {
     if (i == 0) return m_propertyContainer;
-    return m_layerStack[i-1];
+    return m_fixedOrderLayers[i-1];
 }
 
 bool
--- a/view/View.h	Tue Sep 02 15:20:23 2014 +0100
+++ b/view/View.h	Tue Sep 02 15:25:27 2014 +0100
@@ -286,6 +286,8 @@
 
     virtual int getPropertyContainerCount() const;
 
+    // The 0th property container is the view's own; the rest are the
+    // layers in fixed-order series
     virtual const PropertyContainer *getPropertyContainer(int i) const;
     virtual PropertyContainer *getPropertyContainer(int i);