From 1e83b1e23bd87611ee8c818da3d735fc9c6b13c8 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Sat, 2 Jul 2011 13:52:44 +0200 Subject: [PATCH] Reset filename when recovering project after unexpected exit We must not use "recover.mmp" as regular filename after we recovered the sesion from it as this causes following save cycles to go into the recovery file. Instead load the recovery file via song::createNewProjectFromTemplate() so the used will be asked for a filename when saving the recovered project the first time. Closes #3294122. --- src/core/main.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/core/main.cpp b/src/core/main.cpp index 01d20a30b..090f032ef 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -1,7 +1,7 @@ /* * main.cpp - just main.cpp which is starting up app... * - * Copyright (c) 2004-2010 Tobias Doerffel + * Copyright (c) 2004-2011 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -435,7 +435,14 @@ int main( int argc, char * * argv ) { engine::mainWindow()->showMaximized(); } - engine::getSong()->loadProject( file_to_load ); + if( file_to_load == recoveryFile ) + { + engine::getSong()->createNewProjectFromTemplate( file_to_load ); + } + else + { + engine::getSong()->loadProject( file_to_load ); + } } else if( !file_to_import.isEmpty() ) {