fix project re-load missing layers (fixes #16560)

This commit is contained in:
Mathieu Pellerin 2017-05-31 13:51:33 +07:00 committed by GitHub
parent 77fd7e63ea
commit 77cd7afaaa

View File

@ -5224,15 +5224,15 @@ void QgisApp::enableProjectMacros()
*/
bool QgisApp::addProject( const QString &projectFile )
{
// close the previous opened project if any
closeProject();
QFileInfo pfi( projectFile );
mStatusBar->showMessage( tr( "Loading project: %1" ).arg( pfi.fileName() ) );
qApp->processEvents();
QApplication::setOverrideCursor( Qt::WaitCursor );
// close the previous opened project if any
closeProject();
bool autoSetupOnFirstLayer = mLayerTreeCanvasBridge->autoSetupOnFirstLayer();
mLayerTreeCanvasBridge->setAutoSetupOnFirstLayer( false );