mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 20:31:29 +02:00
make all toggle menu items work properly through Menu scripting interface
This commit is contained in:
parent
d1c024fb39
commit
18f5b14e7a
1 changed files with 5 additions and 2 deletions
|
@ -222,8 +222,11 @@ void Menu::setIsOptionChecked(const QString& menuOption, bool isChecked) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
QAction* menu = _actionHash.value(menuOption);
|
QAction* menu = _actionHash.value(menuOption);
|
||||||
if (menu) {
|
if (menu && menu->isCheckable()) {
|
||||||
menu->setChecked(isChecked);
|
auto wasChecked = menu->isChecked();
|
||||||
|
if (wasChecked != isChecked) {
|
||||||
|
menu->trigger();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue