Skip to content
Permalink
Browse files

Really fix welcome screen vs project loading

This partially reverts commit bea14e3.
  • Loading branch information
m-kuhn committed Aug 29, 2015
1 parent aeeca48 commit 44e2a9990736755b3854073c94b49d40a0364add
Showing with 7 additions and 4 deletions.
  1. +7 −4 src/app/qgisapp.cpp
@@ -588,13 +588,13 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, QWidget * parent,
mCentralContainer->insertWidget( 0, mMapCanvas );
mCentralContainer->insertWidget( 1, mWelcomePage );

qobject_cast<QGridLayout *>( centralWidget->layout() )->addWidget( mCentralContainer, 0, 0, 2, 1 );
centralLayout->addWidget( mCentralContainer, 0, 0, 2, 1 );

connect( mMapCanvas, SIGNAL( layersChanged() ), this, SLOT( showMapCanvas() ) );
connect( this, SIGNAL( newProject() ), this, SLOT( showMapCanvas() ) );

mCentralContainer->setCurrentIndex( 1 );


// a bar to warn the user with non-blocking messages
mInfoBar = new QgsMessageBar( centralWidget );
mInfoBar->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Fixed );
@@ -3932,12 +3932,15 @@ void QgisApp::fileOpenAfterLaunch()
// what type of project to auto-open
int projOpen = settings.value( "/qgis/projOpenAtLaunch", 0 ).toInt();

// get path of project file to open, or was attempted
QString projPath = QString();
if ( projOpen == 0 ) // welcome page
{
connect( this, SIGNAL( newProject() ), this, SLOT( showMapCanvas() ) );
return;
}

// get path of project file to open, or was attempted
QString projPath;

if ( projOpen == 1 && mRecentProjects.size() > 0 ) // most recent project
{
projPath = mRecentProjects.at( 0 ).path;

0 comments on commit 44e2a99

Please sign in to comment.
You can’t perform that action at this time.