mirror of
https://github.com/overte-org/overte.git
synced 2025-06-23 20:00:27 +02:00
Merge pull request #4431 from ZappoMan/windowsMenuAssert
Fix windows assert
This commit is contained in:
commit
a6b5a73844
1 changed files with 6 additions and 0 deletions
|
@ -697,6 +697,12 @@ void Menu::removeAction(QMenu* menu, const QString& actionName) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Menu::setIsOptionChecked(const QString& menuOption, bool isChecked) {
|
void Menu::setIsOptionChecked(const QString& menuOption, bool isChecked) {
|
||||||
|
if (thread() != QThread::currentThread()) {
|
||||||
|
QMetaObject::invokeMethod(Menu::getInstance(), "setIsOptionChecked", Qt::BlockingQueuedConnection,
|
||||||
|
Q_ARG(const QString&, menuOption),
|
||||||
|
Q_ARG(bool, isChecked));
|
||||||
|
return;
|
||||||
|
}
|
||||||
QAction* menu = _actionHash.value(menuOption);
|
QAction* menu = _actionHash.value(menuOption);
|
||||||
if (menu) {
|
if (menu) {
|
||||||
menu->setChecked(isChecked);
|
menu->setChecked(isChecked);
|
||||||
|
|
Loading…
Reference in a new issue