Skip to content
Permalink
Browse files
Merge pull request #4290 from nyalldawson/fix_16149
Fix incorrect project CRS when loading project (fix #16149)
  • Loading branch information
nyalldawson committed Mar 29, 2017
2 parents da41af1 + 21df625 commit 31762193dfbafd42f04e357f75f2f0ea0dfa834f
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/app/qgisapp.cpp
@@ -5178,6 +5178,9 @@ bool QgisApp::addProject( const QString &projectFile )
// close the previous opened project if any
closeProject();

bool autoSetupOnFirstLayer = mLayerTreeCanvasBridge->autoSetupOnFirstLayer();
mLayerTreeCanvasBridge->setAutoSetupOnFirstLayer( false );

if ( !QgsProject::instance()->read( projectFile ) )
{
QString backupFile = projectFile + "~";
@@ -5294,6 +5297,9 @@ bool QgisApp::addProject( const QString &projectFile )

QApplication::restoreOverrideCursor();

if ( autoSetupOnFirstLayer )
mLayerTreeCanvasBridge->setAutoSetupOnFirstLayer( true );

mMapCanvas->freeze( false );
mMapCanvas->refresh();

0 comments on commit 3176219

Please sign in to comment.