Added workaround for submenu on macOS.
This commit is contained in:
parent
897bea2baf
commit
01d10cbdbf
1 changed files with 5 additions and 0 deletions
|
|
@ -187,7 +187,12 @@ void PopupMenu::handleTriggered(const Menu::CallbackData &data) {
|
|||
bool PopupMenu::popupSubmenuFromAction(const Menu::CallbackData &data) {
|
||||
if (auto submenu = _submenus.value(data.action)) {
|
||||
if (_activeSubmenu == submenu) {
|
||||
// There is a strange problem on macOS
|
||||
// when a submenu closes arbitrarily
|
||||
// if we try to move the cursor to it.
|
||||
#ifndef Q_OS_MAC
|
||||
submenu->hideMenu(true);
|
||||
#endif
|
||||
} else {
|
||||
popupSubmenu(submenu, data.actionTop, data.source);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue