# HG changeset patch # User Chris Cannam # Date 1235496355 0 # Node ID 5d691489a84fa41c84f546a97461a778fe373506 # Parent 2fe08e403a9bdacda7771eac9253c417a59511f3 * rtmidi & activity updates diff -r 2fe08e403a9b -r 5d691489a84f main/MainWindow.cpp --- a/main/MainWindow.cpp Tue Feb 24 14:01:42 2009 +0000 +++ b/main/MainWindow.cpp Tue Feb 24 17:25:55 2009 +0000 @@ -271,14 +271,16 @@ statusBar(); - newSession(); - connect(m_viewManager, SIGNAL(activity(QString)), m_activityLog, SLOT(activityHappened(QString))); connect(m_playSource, SIGNAL(activity(QString)), m_activityLog, SLOT(activityHappened(QString))); connect(CommandHistory::getInstance(), SIGNAL(activity(QString)), m_activityLog, SLOT(activityHappened(QString))); + connect(this, SIGNAL(replacedDocument()), this, SLOT(documentReplaced())); + + newSession(); + m_activityLog->show(); TransformFactory::getInstance()->startPopulationThread(); @@ -2408,6 +2410,15 @@ } void +MainWindow::documentReplaced() +{ + if (m_document) { + connect(m_document, SIGNAL(activity(QString)), + m_activityLog, SLOT(activityHappened(QString))); + } +} + +void MainWindow::closeSession() { if (!checkSaveModified()) return; diff -r 2fe08e403a9b -r 5d691489a84f main/MainWindow.h --- a/main/MainWindow.h Tue Feb 24 14:01:42 2009 +0000 +++ b/main/MainWindow.h Tue Feb 24 17:25:55 2009 +0000 @@ -106,6 +106,7 @@ virtual void documentModified(); virtual void documentRestored(); + virtual void documentReplaced(); virtual void updateMenuStates(); virtual void updateDescriptionLabel();