Skip to content

Commit

Permalink
Fix vector layer export transform selection choice is ignored
Browse files Browse the repository at this point in the history
Fixes #21275
  • Loading branch information
nyalldawson committed Mar 12, 2019
1 parent c458a53 commit 41a7266
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7856,7 +7856,13 @@ QString QgisApp::saveAsVectorFileGeneral( QgsVectorLayer *vlayer, bool symbology
if ( dlg.availableTransformationCount() > 1 &&
settings.value( QStringLiteral( "Projections/showDatumTransformDialog" ), false ).toBool() )
{
dlg.exec();
if ( dlg.exec() )
{
QPair< QPair<QgsCoordinateReferenceSystem, int>, QPair<QgsCoordinateReferenceSystem, int > > dt = dlg.selectedDatumTransforms();
QgsCoordinateTransformContext context = QgsProject::instance()->transformContext();
context.addSourceDestinationDatumTransform( dt.first.first, dt.second.first, dt.first.second, dt.second.second );
QgsProject::instance()->setTransformContext( context );
}
}
ct = QgsCoordinateTransform( vlayer->crs(), destCRS, QgsProject::instance() );
}
Expand Down

0 comments on commit 41a7266

Please sign in to comment.