Skip to content
Permalink
Browse files

Move datum transformation dialog prompting behaviour setting to a new

key to reset ALL users to a default value

And add to qgis_global_settings.ini

Sponsored by ICSM
  • Loading branch information
nyalldawson committed Mar 12, 2019
1 parent 3505eb9 commit 785c03358e29ea9c1d96f694158768bf7a710e61
@@ -40,6 +40,11 @@ connections-xyz\OpenStreetMap\username=
connections-xyz\OpenStreetMap\zmax=19
connections-xyz\OpenStreetMap\zmin=0

# Whether to prompt users for a selection when multiple possible transformation paths exist
# when transforming coordinates. If false, a reasonable choice will be estimated by default
# without asking users. If true, users are always required to make this choice themselves.
projections\promptWhenMultipleTransformsExist=false

# application stylesheet

# Padding (in pixels) to add to toolbar icons, if blank then default padding will be used
@@ -466,7 +466,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl, const QList<QgsOpti
leProjectGlobalCrs->setCrs( mDefaultCrs );
leProjectGlobalCrs->setOptionVisible( QgsProjectionSelectionWidget::DefaultCrs, false );

mShowDatumTransformDialogCheckBox->setChecked( mSettings->value( QStringLiteral( "/Projections/showDatumTransformDialog" ), false ).toBool() );
mShowDatumTransformDialogCheckBox->setChecked( mSettings->value( QStringLiteral( "/projections/promptWhenMultipleTransformsExist" ), false, QgsSettings::App ).toBool() );

// Datum transforms
QgsCoordinateTransformContext context;
@@ -1540,7 +1540,7 @@ void QgsOptions::saveOptions()
mSettings->setValue( QStringLiteral( "/Projections/layerDefaultCrs" ), mLayerDefaultCrs.authid() );
mSettings->setValue( QStringLiteral( "/Projections/projectDefaultCrs" ), mDefaultCrs.authid() );

mSettings->setValue( QStringLiteral( "/Projections/showDatumTransformDialog" ), mShowDatumTransformDialogCheckBox->isChecked() );
mSettings->setValue( QStringLiteral( "/projections/promptWhenMultipleTransformsExist" ), mShowDatumTransformDialogCheckBox->isChecked(), QgsSettings::App );

//measurement settings

@@ -175,7 +175,7 @@ QgsProjectProperties::QgsProjectProperties( QgsMapCanvas *mapCanvas, QWidget *pa
QgsCoordinateTransformContext context = QgsProject::instance()->transformContext();
mDatumTransformTableWidget->setTransformContext( context );

bool show = settings.value( QStringLiteral( "/Projections/showDatumTransformDialog" ), false ).toBool();
bool show = settings.value( QStringLiteral( "/projections/promptWhenMultipleTransformsExist" ), false, QgsSettings::App ).toBool();
mShowDatumTransformDialogCheckBox->setChecked( show );

QPolygonF mainCanvasPoly = mapCanvas->mapSettings().visiblePolygon();
@@ -257,7 +257,7 @@ bool QgsDatumTransformDialog::shouldAskUserForSelection()
{
if ( mDatumTransforms.count() > 1 )
{
return QgsSettings().value( QStringLiteral( "/Projections/showDatumTransformDialog" ), false ).toBool();
return QgsSettings().value( QStringLiteral( "/projections/promptWhenMultipleTransformsExist" ), false, QgsSettings::App ).toBool();
}
// TODO: show if transform grids are required, but missing
return false;

0 comments on commit 785c033

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