From 76e690a1a05c14ce4b4c1b0797696d6269201767 Mon Sep 17 00:00:00 2001 From: Oskar Wallgren Date: Fri, 29 Jan 2016 19:43:57 +0100 Subject: [PATCH] Fixed indentation --- src/core/main.cpp | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/core/main.cpp b/src/core/main.cpp index d5beb6d9b..d9d032c57 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -770,33 +770,32 @@ int main( int argc, char * * argv ) } else { - - // If enabled, open last project if there is one. Else, create - // a new one. Also skip recently opened file if limited session to - // lower the chance of opening an already opened file. - if( ConfigManager::inst()-> - value( "app", "openlastproject" ).toInt() && - !ConfigManager::inst()->recentlyOpenedProjects().isEmpty() && - gui->mainWindow()->getSession() - != MainWindow::SessionState::Limited ) - { - QString f = ConfigManager::inst()-> - recentlyOpenedProjects().first(); - QFileInfo recentFile( f ); - - if ( recentFile.exists() ) + // If enabled, open last project if there is one. Else, create + // a new one. Also skip recently opened file if limited session to + // lower the chance of opening an already opened file. + if( ConfigManager::inst()-> + value( "app", "openlastproject" ).toInt() && + !ConfigManager::inst()->recentlyOpenedProjects().isEmpty() && + gui->mainWindow()->getSession() + != MainWindow::SessionState::Limited ) { - Engine::getSong()->loadProject( f ); + QString f = ConfigManager::inst()-> + recentlyOpenedProjects().first(); + QFileInfo recentFile( f ); + + if ( recentFile.exists() ) + { + Engine::getSong()->loadProject( f ); + } + else + { + Engine::getSong()->createNewProject(); + } } else { Engine::getSong()->createNewProject(); } - } - else - { - Engine::getSong()->createNewProject(); - } // [Settel] workaround: showMaximized() doesn't work with // FVWM2 unless the window is already visible -> show() first @@ -806,6 +805,7 @@ int main( int argc, char * * argv ) gui->mainWindow()->showMaximized(); } } + // Finally we start the auto save timer and also trigger the // autosave one time as recover.mmp is a signal to possible other // instances of LMMS.