Ask for saving changes before opening recent project

Fixes #1065
This commit is contained in:
Lukas W
2014-10-31 13:35:54 +01:00
parent c5349d40b9
commit c682567e4b
2 changed files with 22 additions and 8 deletions

View File

@@ -754,11 +754,14 @@ void MainWindow::updateRecentlyOpenedProjectsMenu()
void MainWindow::openRecentlyOpenedProject( QAction * _action )
{
const QString & f = _action->text();
setCursor( Qt::WaitCursor );
engine::getSong()->loadProject( f );
configManager::inst()->addRecentlyOpenedProject( f );
setCursor( Qt::ArrowCursor );
if ( mayChangeProject() )
{
const QString & f = _action->text();
setCursor( Qt::WaitCursor );
engine::getSong()->loadProject( f );
configManager::inst()->addRecentlyOpenedProject( f );
setCursor( Qt::ArrowCursor );
}
}