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.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* main.cpp - just main.cpp which is starting up app...
|
||||
*
|
||||
* Copyright (c) 2004-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2011 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* 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() )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user