# HG changeset patch # User Chris Cannam # Date 1396470356 -3600 # Node ID 4eccff14b4d8766b461d126b5bad88e435483677 # Parent 93cf23bfa1cba443d912716dcf6c20448b0b868d Much fiddling toward getting sessions and individual audio files to load cleanly when they need quite different handling after load diff -r 93cf23bfa1cb -r 4eccff14b4d8 framework/MainWindowBase.cpp --- a/framework/MainWindowBase.cpp Wed Apr 02 18:22:41 2014 +0100 +++ b/framework/MainWindowBase.cpp Wed Apr 02 21:25:56 2014 +0100 @@ -1392,6 +1392,8 @@ currentPaneChanged(m_paneStack->getCurrentPane()); + emit audioFileLoaded(); + return FileOpenSucceeded; } @@ -1744,6 +1746,8 @@ source.getLocalFilename()); } + emit sessionLoaded(); + } else { setWindowTitle(QApplication::applicationName()); } @@ -1826,6 +1830,8 @@ CommandHistory::getInstance()->documentSaved(); m_documentModified = false; updateMenuStates(); + + emit sessionLoaded(); } return ok ? FileOpenSucceeded : FileOpenFailed; @@ -1857,6 +1863,8 @@ CommandHistory::getInstance()->documentSaved(); m_documentModified = false; + emit sessionLoaded(); + return status; } @@ -2211,6 +2219,7 @@ Pane * MainWindowBase::addPaneToStack() { + cerr << "MainWindowBase::addPaneToStack()" << endl; AddPaneCommand *command = new AddPaneCommand(this); CommandHistory::getInstance()->addCommand(command); Pane *pane = command->getPane(); diff -r 93cf23bfa1cb -r 4eccff14b4d8 framework/MainWindowBase.h --- a/framework/MainWindowBase.h Wed Apr 02 18:22:41 2014 +0100 +++ b/framework/MainWindowBase.h Wed Apr 02 21:25:56 2014 +0100 @@ -153,6 +153,8 @@ void canSelectNextLayer(bool); void canSave(bool); void hideSplash(); + void sessionLoaded(); + void audioFileLoaded(); void replacedDocument(); void activity(QString); diff -r 93cf23bfa1cb -r 4eccff14b4d8 framework/SVFileReader.cpp --- a/framework/SVFileReader.cpp Wed Apr 02 18:22:41 2014 +0100 +++ b/framework/SVFileReader.cpp Wed Apr 02 21:25:56 2014 +0100 @@ -726,6 +726,8 @@ m_currentPane = m_paneCallback.addPane(); + cerr << "SVFileReader::addPane: pane is " << m_currentPane << endl; + if (!m_currentPane) { cerr << "WARNING: SV-XML: Internal error: Failed to add pane!" << endl;