Cocoa: Force menubar update after inserting a new menu

Task-number: QTBUG-38135

Change-Id: I7bb9f41789cc77c26a9623d69c28e3ad1607bb9c
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
This commit is contained in:
Gabriel de Dietrich 2014-04-08 18:27:52 +02:00 committed by The Qt Project
parent 154b35e8c0
commit efa7a5a659

View File

@ -124,6 +124,8 @@ void QCocoaMenuBar::insertMenu(QPlatformMenu *platformMenu, QPlatformMenu *befor
m_menus.insert(beforeMenu ? m_menus.indexOf(beforeMenu) : m_menus.size(), menu);
if (!menu->menuBar())
insertNativeMenu(menu, beforeMenu);
if (m_window && m_window->window()->isActive())
updateMenuBarImmediately();
}
void QCocoaMenuBar::removeNativeMenu(QCocoaMenu *menu)