Skip to content
Permalink
Browse files

Fix loss of transform context changes when editing project CRS in pro…

…ject properties dialog
  • Loading branch information
nyalldawson committed Mar 12, 2019
1 parent 0b6fdd9 commit fe50e24ccfca4935e9663f58db9bfff128775b83
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/app/qgsprojectproperties.cpp
@@ -943,6 +943,10 @@ void QgsProjectProperties::apply()
{
mMapCanvas->enableMapTileRendering( mMapTileRenderingCheckBox->isChecked() );

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

QgsCoordinateTransformContext transformContext = mDatumTransformTableWidget->transformContext();
QgsProject::instance()->setTransformContext( transformContext );

mMetadataWidget->acceptMetadata();

// Set the project title

0 comments on commit fe50e24

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