comparison widgets/PaneStack.cpp @ 19:46d8f5add6f0

* Introduce potentially-separate read and write ring buffers, so we can swap in a new set when something changes -- thus allowing us to respond quickly when something changes during playback, without losing the long buffers * Some fixes for display & editing
author Chris Cannam
date Fri, 27 Jan 2006 18:04:07 +0000
parents 0183ebb725ca
children 651e4e868bcc
comparison
equal deleted inserted replaced
18:7c767d41bcee 19:46d8f5add6f0
155 m_currentPane = pane; 155 m_currentPane = pane;
156 156
157 emit currentPaneChanged(m_currentPane); 157 emit currentPaneChanged(m_currentPane);
158 } 158 }
159 159
160 void
161 PaneStack::setCurrentLayer(Pane *pane, Layer *layer) // may be null
162 {
163 setCurrentPane(pane);
164
165 if (m_currentPane) {
166
167 std::vector<Pane *>::iterator i = m_panes.begin();
168 std::vector<QWidget *>::iterator j = m_propertyStacks.begin();
169
170 while (i != m_panes.end()) {
171
172 if (*i == pane) {
173 PropertyStack *stack = dynamic_cast<PropertyStack *>(*j);
174 if (stack) {
175 if (stack->containsContainer(layer)) {
176 stack->setCurrentIndex(stack->getContainerIndex(layer));
177 emit currentLayerChanged(pane, layer);
178 } else {
179 stack->setCurrentIndex(stack->getContainerIndex(pane));
180 emit currentLayerChanged(pane, 0);
181 }
182 }
183 break;
184 }
185 ++i;
186 ++j;
187 }
188 }
189 }
190
160 Pane * 191 Pane *
161 PaneStack::getCurrentPane() 192 PaneStack::getCurrentPane()
162 { 193 {
163 return m_currentPane; 194 return m_currentPane;
164 } 195 }