# HG changeset patch # User Chris Cannam # Date 1303911995 -3600 # Node ID a0d162a3f3a7c0dc8f1f25b6c1a44e3d93fb15d1 # Parent 9f25742b59530f05db50dbc2520449816913be5d Use ReplaceSession mode where appropriate in place of ReplaceMainModel (#148) diff -r 9f25742b5953 -r a0d162a3f3a7 main/MainWindow.cpp --- a/main/MainWindow.cpp Wed Apr 27 11:33:28 2011 +0100 +++ b/main/MainWindow.cpp Wed Apr 27 14:46:35 2011 +0100 @@ -2149,7 +2149,7 @@ QString path = getOpenFileName(FileFinder::AudioFile); if (path != "") { - if (openAudio(path, ReplaceMainModel) == FileOpenFailed) { + if (openAudio(path, ReplaceSession) == FileOpenFailed) { emit hideSplash(); QMessageBox::critical(this, tr("Failed to open file"), tr("File open failed
Audio file \"%1\" could not be opened").arg(path)); diff -r 9f25742b5953 -r a0d162a3f3a7 main/main.cpp --- a/main/main.cpp Wed Apr 27 11:33:28 2011 +0100 +++ b/main/main.cpp Wed Apr 27 14:46:35 2011 +0100 @@ -468,7 +468,7 @@ } if (status != MainWindow::FileOpenSucceeded) { if (!haveMainModel) { - status = m_mainWindow->open(path, MainWindow::ReplaceMainModel); + status = m_mainWindow->open(path, MainWindow::ReplaceSession); if (status == MainWindow::FileOpenSucceeded) { haveMainModel = true; }