diff framework/MainWindowBase.cpp @ 347:b3609adae921 tony_integration

Merge from tonioni branch
author Chris Cannam
date Wed, 07 May 2014 15:12:35 +0100
parents 1e3af7f4fa86 4eccff14b4d8
children 1d8cb0d92f4b
line wrap: on
line diff
--- a/framework/MainWindowBase.cpp	Wed May 07 15:11:20 2014 +0100
+++ b/framework/MainWindowBase.cpp	Wed May 07 15:12:35 2014 +0100
@@ -45,6 +45,7 @@
 #include "widgets/MIDIFileImportDialog.h"
 #include "widgets/CSVFormatDialog.h"
 #include "widgets/ModelDataTableDialog.h"
+#include "widgets/InteractiveFileFinder.h"
 
 #include "audioio/AudioCallbackPlaySource.h"
 #include "audioio/AudioCallbackPlayTarget.h"
@@ -1393,6 +1394,8 @@
 
     currentPaneChanged(m_paneStack->getCurrentPane());
 
+    emit audioFileLoaded();
+
     return FileOpenSucceeded;
 }
 
@@ -1637,7 +1640,10 @@
     if (!source.isAvailable()) return FileOpenFailed;
     source.waitForData();
 
-    if (source.getExtension().toLower() != "sv") {
+    QString sessionExt = 
+        InteractiveFileFinder::getInstance()->getApplicationSessionExtension();
+
+    if (source.getExtension().toLower() != sessionExt) {
 
         RDFImporter::RDFDocumentType rdfType = 
             RDFImporter::identifyDocumentType
@@ -1668,7 +1674,7 @@
     BZipFileDevice *bzFile = 0;
     QFile *rawFile = 0;
 
-    if (source.getExtension().toLower() == "sv") {
+    if (source.getExtension().toLower() == sessionExt) {
         bzFile = new BZipFileDevice(source.getLocalFilename());
         if (!bzFile->open(QIODevice::ReadOnly)) {
             delete bzFile;
@@ -1742,6 +1748,8 @@
                                        source.getLocalFilename());
         }
 
+        emit sessionLoaded();
+
     } else {
 	setWindowTitle(QApplication::applicationName());
     }
@@ -1824,6 +1832,8 @@
 	CommandHistory::getInstance()->documentSaved();
 	m_documentModified = false;
 	updateMenuStates();
+
+        emit sessionLoaded();
     }
 
     return ok ? FileOpenSucceeded : FileOpenFailed;
@@ -1855,6 +1865,8 @@
     CommandHistory::getInstance()->documentSaved();
     m_documentModified = false;
 
+    emit sessionLoaded();
+
     return status;
 }
 
@@ -2209,6 +2221,7 @@
 Pane *
 MainWindowBase::addPaneToStack()
 {
+    cerr << "MainWindowBase::addPaneToStack()" << endl;
     AddPaneCommand *command = new AddPaneCommand(this);
     CommandHistory::getInstance()->addCommand(command);
     Pane *pane = command->getPane();