Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix vector layer export transform selection choice is ignored
Fixes #21275
  • Loading branch information
nyalldawson committed Mar 19, 2019
1 parent c458a53 commit 7671419
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/app/qgisapp.cpp
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 7671419

Please sign in to comment.