mirror of
https://github.com/LMMS/lmms.git
synced 2026-03-14 12:08:33 -04:00
Some fixes to recent files (#3621)
* Add a factory default data/projects/templates/default.mpt. Fixes #528 * On launch, if the last project was a template we create a new project (default.mpt) instead. * If there is a recovery file present and you discard it we create a new project as the project launched could be defective or, if .lmmsrc.xml wasn't written, an earlier project.
This commit is contained in:
@@ -846,13 +846,15 @@ int main( int argc, char * * argv )
|
||||
else if( ConfigManager::inst()->
|
||||
value( "app", "openlastproject" ).toInt() &&
|
||||
!ConfigManager::inst()->
|
||||
recentlyOpenedProjects().isEmpty() )
|
||||
recentlyOpenedProjects().isEmpty() &&
|
||||
!recoveryFilePresent )
|
||||
{
|
||||
QString f = ConfigManager::inst()->
|
||||
recentlyOpenedProjects().first();
|
||||
QFileInfo recentFile( f );
|
||||
|
||||
if ( recentFile.exists() )
|
||||
if ( recentFile.exists() &&
|
||||
recentFile.suffix().toLower() != "mpt" )
|
||||
{
|
||||
Engine::getSong()->loadProject( f );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user