Mercurial > hg > svgui
comparison view/View.cpp @ 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 |
comparison
equal
deleted
inserted
replaced
836:1384485650e3 | 837:6c4cab21e387 |
---|---|
162 } | 162 } |
163 | 163 |
164 int | 164 int |
165 View::getPropertyContainerCount() const | 165 View::getPropertyContainerCount() const |
166 { | 166 { |
167 return m_layerStack.size() + 1; // the 1 is for me | 167 return m_fixedOrderLayers.size() + 1; // the 1 is for me |
168 } | 168 } |
169 | 169 |
170 const PropertyContainer * | 170 const PropertyContainer * |
171 View::getPropertyContainer(int i) const | 171 View::getPropertyContainer(int i) const |
172 { | 172 { |
176 | 176 |
177 PropertyContainer * | 177 PropertyContainer * |
178 View::getPropertyContainer(int i) | 178 View::getPropertyContainer(int i) |
179 { | 179 { |
180 if (i == 0) return m_propertyContainer; | 180 if (i == 0) return m_propertyContainer; |
181 return m_layerStack[i-1]; | 181 return m_fixedOrderLayers[i-1]; |
182 } | 182 } |
183 | 183 |
184 bool | 184 bool |
185 View::getValueExtents(QString unit, float &min, float &max, bool &log) const | 185 View::getValueExtents(QString unit, float &min, float &max, bool &log) const |
186 { | 186 { |