]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/menu.cpp
Correct remaining bits of variable height lines for wxMac, change highlight colour...
[wxWidgets.git] / src / mac / carbon / menu.cpp
index bc16a338c522cccae9b7479a329f82b75307273c..9311f4fdb63bfc176cc9055d836128bb5c76a39b 100644 (file)
@@ -223,7 +223,10 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos)
             wxASSERT_MSG( pSubMenu->m_hMenu != NULL , wxT("invalid submenu added"));
             pSubMenu->m_menuParent = this ;
 
-            if (wxMenuBar::MacGetInstalledMenuBar() == GetMenuBar())
+            // We need the !GetMenuBar() check to make sure we run MacBeforeDisplay()
+            // for popup menus and other menus which may not be part of the main
+            // menu bar. 
+            if (!GetMenuBar() || wxMenuBar::MacGetInstalledMenuBar() == GetMenuBar())
                 pSubMenu->MacBeforeDisplay( true ) ;
 
             if ( pos == (size_t)-1 )