Mercurial > hg > sonic-segmenter
changeset 4:a88c2a0279ba
* more minor updates towards segmenter program
| author | Chris Cannam |
|---|---|
| date | Tue, 09 Jun 2009 15:25:06 +0000 |
| parents | 36855d576f53 |
| children | b7e2027ec4bd |
| files | main/MainWindow.cpp |
| diffstat | 1 files changed, 5 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/main/MainWindow.cpp Tue Jun 09 13:02:03 2009 +0000 +++ b/main/MainWindow.cpp Tue Jun 09 15:25:06 2009 +0000 @@ -1248,20 +1248,17 @@ if (newLayer) { - AddPaneCommand *command = new AddPaneCommand(this); - CommandHistory::getInstance()->addCommand(command); - - Pane *pane = command->getPane(); - if (!pane) return; - // Set the source model to NULL to avoid us treating it as a // different visualisation for the main model and replacing it // when one of the visualisation mode toggles is activated newLayer->getModel()->setSourceModel(0); + m_document->setChannel(newLayer, input.getChannel()); + Pane *pane = m_paneStack->insertPane(0); m_document->addLayerToView(pane, newLayer); - m_document->setChannel(newLayer, input.getChannel()); -// m_paneStack->setCurrentLayer(pane, newLayer); + + pane = m_paneStack->insertPane(m_paneStack->getPaneCount()); + m_document->addLayerToView(pane, newLayer); } updateMenuStates();
