comparison framework/MainWindowBase.cpp @ 342:4eccff14b4d8 tonioni

Much fiddling toward getting sessions and individual audio files to load cleanly when they need quite different handling after load
author Chris Cannam
date Wed, 02 Apr 2014 21:25:56 +0100
parents 93cf23bfa1cb
children b3609adae921
comparison
equal deleted inserted replaced
341:93cf23bfa1cb 342:4eccff14b4d8
1390 } 1390 }
1391 m_openingAudioFile = false; 1391 m_openingAudioFile = false;
1392 1392
1393 currentPaneChanged(m_paneStack->getCurrentPane()); 1393 currentPaneChanged(m_paneStack->getCurrentPane());
1394 1394
1395 emit audioFileLoaded();
1396
1395 return FileOpenSucceeded; 1397 return FileOpenSucceeded;
1396 } 1398 }
1397 1399
1398 MainWindowBase::FileOpenStatus 1400 MainWindowBase::FileOpenStatus
1399 MainWindowBase::openPlaylist(FileSource source, AudioFileOpenMode mode) 1401 MainWindowBase::openPlaylist(FileSource source, AudioFileOpenMode mode)
1742 // for file dialog 1744 // for file dialog
1743 registerLastOpenedFilePath(FileFinder::SessionFile, 1745 registerLastOpenedFilePath(FileFinder::SessionFile,
1744 source.getLocalFilename()); 1746 source.getLocalFilename());
1745 } 1747 }
1746 1748
1749 emit sessionLoaded();
1750
1747 } else { 1751 } else {
1748 setWindowTitle(QApplication::applicationName()); 1752 setWindowTitle(QApplication::applicationName());
1749 } 1753 }
1750 1754
1751 return ok ? FileOpenSucceeded : FileOpenFailed; 1755 return ok ? FileOpenSucceeded : FileOpenFailed;
1824 1828
1825 CommandHistory::getInstance()->clear(); 1829 CommandHistory::getInstance()->clear();
1826 CommandHistory::getInstance()->documentSaved(); 1830 CommandHistory::getInstance()->documentSaved();
1827 m_documentModified = false; 1831 m_documentModified = false;
1828 updateMenuStates(); 1832 updateMenuStates();
1833
1834 emit sessionLoaded();
1829 } 1835 }
1830 1836
1831 return ok ? FileOpenSucceeded : FileOpenFailed; 1837 return ok ? FileOpenSucceeded : FileOpenFailed;
1832 } 1838 }
1833 1839
1854 .arg(QApplication::applicationName()) 1860 .arg(QApplication::applicationName())
1855 .arg(source.getLocation())); 1861 .arg(source.getLocation()));
1856 CommandHistory::getInstance()->clear(); 1862 CommandHistory::getInstance()->clear();
1857 CommandHistory::getInstance()->documentSaved(); 1863 CommandHistory::getInstance()->documentSaved();
1858 m_documentModified = false; 1864 m_documentModified = false;
1865
1866 emit sessionLoaded();
1859 1867
1860 return status; 1868 return status;
1861 } 1869 }
1862 1870
1863 MainWindowBase::FileOpenStatus 1871 MainWindowBase::FileOpenStatus
2209 } 2217 }
2210 2218
2211 Pane * 2219 Pane *
2212 MainWindowBase::addPaneToStack() 2220 MainWindowBase::addPaneToStack()
2213 { 2221 {
2222 cerr << "MainWindowBase::addPaneToStack()" << endl;
2214 AddPaneCommand *command = new AddPaneCommand(this); 2223 AddPaneCommand *command = new AddPaneCommand(this);
2215 CommandHistory::getInstance()->addCommand(command); 2224 CommandHistory::getInstance()->addCommand(command);
2216 Pane *pane = command->getPane(); 2225 Pane *pane = command->getPane();
2217 return pane; 2226 return pane;
2218 } 2227 }