diff view/PaneStack.cpp @ 539:566787389e59

* Add insertPane
author Chris Cannam
date Tue, 09 Jun 2009 15:26:25 +0000
parents e4e0ae491a48
children f4960f8ce798
line wrap: on
line diff
--- a/view/PaneStack.cpp	Fri Jun 05 16:08:18 2009 +0000
+++ b/view/PaneStack.cpp	Tue Jun 09 15:26:25 2009 +0000
@@ -62,6 +62,12 @@
 Pane *
 PaneStack::addPane(bool suppressPropertyBox)
 {
+    return insertPane(getPaneCount(), suppressPropertyBox);
+}
+
+Pane *
+PaneStack::insertPane(int index, bool suppressPropertyBox)
+{
     QFrame *frame = new QFrame;
 
     QGridLayout *layout = new QGridLayout;
@@ -129,7 +135,7 @@
     m_panes.push_back(rec);
 
     frame->setLayout(layout);
-    m_splitter->addWidget(frame);
+    m_splitter->insertWidget(index, frame);
 
     connect(pane, SIGNAL(propertyContainerAdded(PropertyContainer *)),
 	    this, SLOT(propertyContainerAdded(PropertyContainer *)));