mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 01:04:06 +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;
|
||||
}
|
||||
QAction* menu = _actionHash.value(menuOption);
|
||||
if (menu) {
|
||||
menu->setChecked(isChecked);
|
||||
if (menu && menu->isCheckable()) {
|
||||
auto wasChecked = menu->isChecked();
|
||||
if (wasChecked != isChecked) {
|
||||
menu->trigger();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue