Mercurial > hg > sonic-visualiser
diff main/MainWindow.cpp @ 118:b4110b17bca8
* Fix #1672407 confused by plugin-named files in cwd (or home?)
* Fix #1491848 crash when loading new file while transform plugin runs
* Fix #1502287 Background remains black after spectrogram layer deleted
* Fix #1604477 Replacing the main audio file silences secondary audio file
* Fix failure to initialise property box layout to last preference on startup
* Fix resample/wrong-rate display in Pane, ensure that right rate is chosen
if all current models have an acceptable rate even if previous main model
had a different one
* Fix "global zoom" broken in previous commit
* Some fixes to spectrogram cache area updating (makes spectrogram appear
more quickly, previously it had a tendency to refresh with empty space)
* Fixes to colour 3d plot normalization
author | Chris Cannam |
---|---|
date | Thu, 08 Mar 2007 16:53:08 +0000 |
parents | 8089a394829a |
children | 3fff180a254b |
line wrap: on
line diff
--- a/main/MainWindow.cpp Wed Mar 07 18:00:49 2007 +0000 +++ b/main/MainWindow.cpp Thu Mar 08 16:53:08 2007 +0000 @@ -286,6 +286,8 @@ MainWindow::~MainWindow() { + std::cerr << "MainWindow::~MainWindow()" << std::endl; + if (!m_abandoning) { closeSession(); } @@ -2334,13 +2336,12 @@ if (setAsMain) { Model *prevMain = getMainModel(); - if (prevMain) m_playSource->removeModel(prevMain); - - PlayParameterRepository::getInstance()->clear(); - - // The clear() call will have removed the parameters for the - // main model. Re-add them with the new one. - PlayParameterRepository::getInstance()->addModel(newModel); + if (prevMain) { + m_playSource->removeModel(prevMain); + PlayParameterRepository::getInstance()->removeModel(prevMain); + } + + PlayParameterRepository::getInstance()->addModel(newModel); m_document->setMainModel(newModel); setupMenus(); @@ -2787,7 +2788,10 @@ void MainWindow::closeEvent(QCloseEvent *e) { + std::cerr << "MainWindow::closeEvent" << std::endl; + if (!m_abandoning && !checkSaveModified()) { + std::cerr << "Ignoring close event" << std::endl; e->ignore(); return; } @@ -3771,19 +3775,10 @@ //!!! more helpful message needed QMessageBox::information (this, tr("Sample rate mismatch"), - tr("The sample rate of this audio file (%1 Hz) does not match\nthe current playback rate (%2 Hz).\n\nThe file will play at the wrong speed.") + tr("The sample rate of this audio file (%1 Hz) does not match\nthe current playback rate (%2 Hz).\n\nThe file will play at the wrong speed and pitch.") .arg(requested).arg(actual)); } -/*!!! Let's not do this for now, and see how we go -- now that we're putting - sample rate information in the status bar - - QMessageBox::information - (this, tr("Sample rate mismatch"), - tr("The sample rate of this audio file (%1 Hz) does not match\nthat of the output audio device (%2 Hz).\n\nThe file will be resampled automatically during playback.") - .arg(requested).arg(actual)); -*/ - updateDescriptionLabel(); }