# HG changeset patch # User Chris Cannam # Date 1409667927 -3600 # Node ID 6c4cab21e387f23263be2171d072bdd4c102b313 # Parent 1384485650e3fa55b739fc81b43807beb51ab536 Use fixed-order layer list for property container enumeration. Fixes habit of the layer property tabs to jump about when adding a new layer. diff -r 1384485650e3 -r 6c4cab21e387 view/View.cpp --- 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 diff -r 1384485650e3 -r 6c4cab21e387 view/View.h --- 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);