Skip to content

Commit

Permalink
Fix double update of dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Mar 22, 2019
1 parent fe50e24 commit 2af0d0d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/gui/qgsdatumtransformdialog.cpp
Expand Up @@ -55,6 +55,9 @@ QgsDatumTransformDialog::QgsDatumTransformDialog( const QgsCoordinateReferenceSy
mDestCrsLabel->setText( QgsProjectionSelectionWidget::crsOptionText( destinationCrs ) );
}

QgsSettings settings;
mHideDeprecatedCheckBox->setChecked( settings.value( QStringLiteral( "Windows/DatumTransformDialog/hideDeprecated" ), true ).toBool() );

connect( mHideDeprecatedCheckBox, &QCheckBox::stateChanged, this, [ = ] { load(); } );
connect( mDatumTransformTableWidget, &QTableWidget::currentItemChanged, this, &QgsDatumTransformDialog::tableCurrentItemChanged );

Expand All @@ -66,11 +69,6 @@ QgsDatumTransformDialog::QgsDatumTransformDialog( const QgsCoordinateReferenceSy
mDestinationCrs = destinationCrs;
mDatumTransforms = QgsDatumTransform::datumTransformations( sourceCrs, destinationCrs );

setOKButtonEnabled();

QgsSettings settings;
mHideDeprecatedCheckBox->setChecked( settings.value( QStringLiteral( "Windows/DatumTransformDialog/hideDeprecated" ), true ).toBool() );

mLabelSrcDescription->clear();
mLabelDstDescription->clear();

Expand Down

0 comments on commit 2af0d0d

Please sign in to comment.