Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix loss of transform context changes when editing project CRS in pro…
…ject properties dialog
  • Loading branch information
nyalldawson committed Mar 22, 2019
1 parent 0b6fdd9 commit fe50e24
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/app/qgsprojectproperties.cpp
Expand Up @@ -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();
Expand All @@ -962,9 +966,6 @@ void QgsProjectProperties::apply()
projectionSelector->pushProjectionToFront();
}

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

mMetadataWidget->acceptMetadata();

// Set the project title
Expand Down

0 comments on commit fe50e24

Please sign in to comment.