Skip to content
Permalink
Browse files

Fix vector layer export transform selection choice is ignored

Fixes #21275
  • Loading branch information
nyalldawson committed Mar 12, 2019
1 parent c458a53 commit 41a72664739395f8043deb276a8889701647c317
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/app/qgisapp.cpp
@@ -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() );
}

0 comments on commit 41a7266

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