Commit 3cd58736 authored by Adriaan de Groot's avatar Adriaan de Groot 💬 Committed by Arjen Hiemstra
Browse files

Only apply the (changed) settings if the dialog is

finished via the OK button (or some other way of accepting
the dialog). Clicking *cancel* should not apply the
changed settings.

BUG: 423260
parent c896cb8b
......@@ -296,7 +296,12 @@ void FancyPlotter::configureSettings()
void FancyPlotter::settingsFinished()
{
applySettings();
if(mSettingsDialog->result() == QDialog::Accepted) {
// Apply and OK also connect to applySettings, but it's
// racy which slot is called first when OK is clicked:
// so do it here, too, and worst case we'll apply twice while OKing.
applySettings();
}
mSettingsDialog->hide();
mSettingsDialog->deleteLater();
mSettingsDialog = nullptr;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment