Skip to content
Permalink
Browse files

Do not change property widget status if the dialog is rejected

refs #16766
  • Loading branch information
DelazJ authored and nyalldawson committed Nov 25, 2017
1 parent 731b57c commit 4f9e2a5f2917785c8cce3d27d3d6185f9889118d
Showing with 10 additions and 8 deletions.
  1. +10 −8 src/gui/qgspropertyoverridebutton.cpp
@@ -639,16 +639,18 @@ void QgsPropertyOverrideButton::showAssistant()
connect( buttonBox, &QDialogButtonBox::rejected, dlg, &QDialog::reject );
connect( buttonBox, &QDialogButtonBox::helpRequested, this, &QgsPropertyOverrideButton::showHelp );
dlg->layout()->addWidget( buttonBox );
dlg->exec();
settings.setValue( key, dlg->saveGeometry() );

widget->updateProperty( mProperty );
mExpressionString = mProperty.asExpression();
mFieldName = mProperty.field();
widget->acceptPanel();
updateGui();
if ( dlg->exec() == QDialog::Accepted )
{
widget->updateProperty( mProperty );
mExpressionString = mProperty.asExpression();
mFieldName = mProperty.field();
widget->acceptPanel();
updateGui();

emit changed();
emit changed();
}
settings.setValue( key, dlg->saveGeometry() );
}
}

0 comments on commit 4f9e2a5

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