Skip to content
Permalink
Browse files

Fix changing source or dest CRS when editing a coordinate operation

fails to correctly save the new operation
  • Loading branch information
nyalldawson committed Dec 19, 2019
1 parent f0f63d3 commit 96645261e523a4ab7c150033a85aabeee0565dbc
Showing with 9 additions and 2 deletions.
  1. +9 −2 src/app/qgsdatumtransformtablewidget.cpp
@@ -302,11 +302,18 @@ void QgsDatumTransformTableWidget::editDatumTransform()
{
const QgsDatumTransformDialog::TransformInfo dt = dlg.selectedDatumTransform();
QgsCoordinateTransformContext context = mModel->transformContext();
if ( sourceCrs != dt.sourceCrs || destinationCrs != dt.destinationCrs )
{
context.removeCoordinateOperation( sourceCrs, destinationCrs );
Q_NOWARN_DEPRECATED_PUSH
context.removeSourceDestinationDatumTransform( sourceCrs, destinationCrs );
Q_NOWARN_DEPRECATED_POP
}
// QMap::insert takes care of replacing existing value
Q_NOWARN_DEPRECATED_PUSH
context.addSourceDestinationDatumTransform( sourceCrs, destinationCrs, dt.sourceTransformId, dt.destinationTransformId );
context.addSourceDestinationDatumTransform( dt.sourceCrs, dt.destinationCrs, dt.sourceTransformId, dt.destinationTransformId );
Q_NOWARN_DEPRECATED_POP
context.addCoordinateOperation( sourceCrs, destinationCrs, dt.proj );
context.addCoordinateOperation( dt.sourceCrs, dt.destinationCrs, dt.proj );
mModel->setTransformContext( context );
}
}

0 comments on commit 9664526

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