From 12c6e194bc25cd9177e112c00b6cd406578be626 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Mon, 28 Jul 2008 08:03:57 +0000 Subject: [PATCH] * initialize random-number generation - fixes problems with duplicate JO-IDs * show main-window before loading project given on command-line or creating a new project (closes #2016741) git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1389 0778d3d1-df1d-0410-868b-ea421aaaa00d --- src/core/main.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/core/main.cpp b/src/core/main.cpp index 1fc24107d..2aebf827f 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -308,8 +308,8 @@ int main( int argc, char * * argv ) // load actual translation for LMMS loadTranslation( pos ); -// app.setFont( pointSize<10>( app.font() ) ); + srandom( getpid() + time( 0 ) ); if( !configManager::inst()->loadConfigFile() ) { @@ -371,6 +371,9 @@ int main( int argc, char * * argv ) // init central engine which handles all components of LMMS engine::init(); + delete ss; + engine::getMainWindow()->showMaximized(); + // we try to load given file if( file_to_load != "" ) { @@ -380,16 +383,14 @@ int main( int argc, char * * argv ) { engine::getSong()->createNewProject(); } - - engine::getMainWindow()->showMaximized(); - - delete ss; } else { // we're going to render our song engine::init( FALSE ); + printf( "loading project...\n" ); engine::getSong()->loadProject( file_to_load ); + printf( "done\n" ); if( !render_out.isEmpty() ) {