changeset 303:5d691489a84f

* rtmidi & activity updates
author Chris Cannam
date Tue, 24 Feb 2009 17:25:55 +0000
parents 2fe08e403a9b
children fdbb3971bafc
files main/MainWindow.cpp main/MainWindow.h
diffstat 2 files changed, 14 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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;
--- 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();