Skip to content

Commit 3176219

Browse files
authoredMar 29, 2017
Merge pull request #4290 from nyalldawson/fix_16149
Fix incorrect project CRS when loading project (fix #16149)
2 parents da41af1 + 21df625 commit 3176219

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎src/app/qgisapp.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5178,6 +5178,9 @@ bool QgisApp::addProject( const QString &projectFile )
51785178
// close the previous opened project if any
51795179
closeProject();
51805180

5181+
bool autoSetupOnFirstLayer = mLayerTreeCanvasBridge->autoSetupOnFirstLayer();
5182+
mLayerTreeCanvasBridge->setAutoSetupOnFirstLayer( false );
5183+
51815184
if ( !QgsProject::instance()->read( projectFile ) )
51825185
{
51835186
QString backupFile = projectFile + "~";
@@ -5294,6 +5297,9 @@ bool QgisApp::addProject( const QString &projectFile )
52945297

52955298
QApplication::restoreOverrideCursor();
52965299

5300+
if ( autoSetupOnFirstLayer )
5301+
mLayerTreeCanvasBridge->setAutoSetupOnFirstLayer( true );
5302+
52975303
mMapCanvas->freeze( false );
52985304
mMapCanvas->refresh();
52995305

0 commit comments

Comments
 (0)
Please sign in to comment.