Skip to content

Commit fe50e24

Browse files
committedMar 22, 2019
Fix loss of transform context changes when editing project CRS in project properties dialog
1 parent 0b6fdd9 commit fe50e24

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed
 

‎src/app/qgsprojectproperties.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -943,6 +943,10 @@ void QgsProjectProperties::apply()
943943
{
944944
mMapCanvas->enableMapTileRendering( mMapTileRenderingCheckBox->isChecked() );
945945

946+
// important - set the transform context first, as changing the project CRS may otherwise change this and
947+
// cause loss of user changes
948+
QgsCoordinateTransformContext transformContext = mDatumTransformTableWidget->transformContext();
949+
QgsProject::instance()->setTransformContext( transformContext );
946950
if ( projectionSelector->hasValidSelection() )
947951
{
948952
QgsCoordinateReferenceSystem srs = projectionSelector->crs();
@@ -962,9 +966,6 @@ void QgsProjectProperties::apply()
962966
projectionSelector->pushProjectionToFront();
963967
}
964968

965-
QgsCoordinateTransformContext transformContext = mDatumTransformTableWidget->transformContext();
966-
QgsProject::instance()->setTransformContext( transformContext );
967-
968969
mMetadataWidget->acceptMetadata();
969970

970971
// Set the project title

0 commit comments

Comments
 (0)
Please sign in to comment.