# HG changeset patch # User Chris Cannam # Date 1244561185 0 # Node ID 566787389e5970db04fa3d19955177be82feb52e # Parent 3bf74851d93ed659799a86f69cce7c7419b8c773 * Add insertPane diff -r 3bf74851d93e -r 566787389e59 view/PaneStack.cpp --- 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 *))); diff -r 3bf74851d93e -r 566787389e59 view/PaneStack.h --- a/view/PaneStack.h Fri Jun 05 16:08:18 2009 +0000 +++ b/view/PaneStack.h Tue Jun 09 15:26:25 2009 +0000 @@ -1,4 +1,3 @@ - /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ /* @@ -41,6 +40,7 @@ PaneStack(QWidget *parent, ViewManager *viewManager); Pane *addPane(bool suppressPropertyBox = false); // I own the returned value + Pane *insertPane(int index, bool suppressPropertyBox = false); // I own the returned value void deletePane(Pane *pane); // Deletes the pane, but _not_ its layers int getPaneCount() const; // Returns only count of visible panes