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 18, 2019
1 parent c910bcd commit d1910f5
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 @@ -7642,7 +7642,13 @@ void QgisApp::saveAsVectorFileGeneral( QgsVectorLayer *vlayer, bool symbologyOpt
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 d1910f5

Please sign in to comment.