From a2432510915a99c6c2ebf339bc38ceca9b5a7ba1 Mon Sep 17 00:00:00 2001 From: Fawzi Mohamed Date: Thu, 21 Feb 2013 14:55:38 +0100 Subject: [PATCH] qcocamenubar: force update after destructor Task-number: QTCREATORBUG-8785 Change-Id: I1e782cab36f4fea331561f016ea67a73deb63c37 Reviewed-by: Richard Moe Gustavsen --- src/plugins/platforms/cocoa/qcocoamenubar.mm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/cocoa/qcocoamenubar.mm b/src/plugins/platforms/cocoa/qcocoamenubar.mm index bae52c91b8..c0c8caed05 100644 --- a/src/plugins/platforms/cocoa/qcocoamenubar.mm +++ b/src/plugins/platforms/cocoa/qcocoamenubar.mm @@ -77,8 +77,10 @@ QCocoaMenuBar::~QCocoaMenuBar() [m_nativeMenu release]; static_menubars.removeOne(this); - if (m_window) + if (m_window && m_window->menubar() == this) { m_window->setMenubar(0); + updateMenuBarImmediately(); + } } void QCocoaMenuBar::insertMenu(QPlatformMenu *platformMenu, QPlatformMenu *before)