mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-01-20 07:30:48 +01:00
Remember user choice on questions
This commit is contained in:
parent
ec4828d4c4
commit
8a900600f5
|
|
@ -74,7 +74,7 @@ bool InformationBox::AskQuestion(QString title, QString question, bool defaultAn
|
|||
}
|
||||
} else {
|
||||
// don't show this question anymore
|
||||
return defaultAnswer;
|
||||
return s.value(hashToSettingsKey(hash)).toBool();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -105,8 +105,13 @@ InformationBox::~InformationBox()
|
|||
{
|
||||
auto cb = checkBox();
|
||||
if(cb->isChecked()) {
|
||||
auto value = true;
|
||||
auto clicked = clickedButton();
|
||||
if(clicked && QMessageBox::standardButton(clicked) == StandardButton::No) {
|
||||
value = false;
|
||||
}
|
||||
QSettings s;
|
||||
s.setValue(hashToSettingsKey(hash), true);
|
||||
s.setValue(hashToSettingsKey(hash), value);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue