Fix loss of transform context changes when editing project CRS in project properties dialog

This commit is contained in:
Nyall Dawson 2019-03-12 12:49:38 +10:00
parent 0b6fdd9b09
commit fe50e24ccf

View File

@ -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