@@ -588,13 +588,13 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, QWidget * parent,
588
588
mCentralContainer ->insertWidget ( 0 , mMapCanvas );
589
589
mCentralContainer ->insertWidget ( 1 , mWelcomePage );
590
590
591
- qobject_cast<QGridLayout *>( centralWidget-> layout () ) ->addWidget ( mCentralContainer , 0 , 0 , 2 , 1 );
591
+ centralLayout ->addWidget ( mCentralContainer , 0 , 0 , 2 , 1 );
592
592
593
593
connect ( mMapCanvas , SIGNAL ( layersChanged () ), this , SLOT ( showMapCanvas () ) );
594
- connect ( this , SIGNAL ( newProject () ), this , SLOT ( showMapCanvas () ) );
595
594
596
595
mCentralContainer ->setCurrentIndex ( 1 );
597
596
597
+
598
598
// a bar to warn the user with non-blocking messages
599
599
mInfoBar = new QgsMessageBar ( centralWidget );
600
600
mInfoBar ->setSizePolicy ( QSizePolicy::Minimum, QSizePolicy::Fixed );
@@ -3932,12 +3932,15 @@ void QgisApp::fileOpenAfterLaunch()
3932
3932
// what type of project to auto-open
3933
3933
int projOpen = settings.value ( " /qgis/projOpenAtLaunch" , 0 ).toInt ();
3934
3934
3935
- // get path of project file to open, or was attempted
3936
- QString projPath = QString ();
3937
3935
if ( projOpen == 0 ) // welcome page
3938
3936
{
3937
+ connect ( this , SIGNAL ( newProject () ), this , SLOT ( showMapCanvas () ) );
3939
3938
return ;
3940
3939
}
3940
+
3941
+ // get path of project file to open, or was attempted
3942
+ QString projPath;
3943
+
3941
3944
if ( projOpen == 1 && mRecentProjects .size () > 0 ) // most recent project
3942
3945
{
3943
3946
projPath = mRecentProjects .at ( 0 ).path ;
0 commit comments