#ifdef Q_WS_MACX
// setup special mac specific menu item
- macxMenuBarInit();
+ macxMenuBarInit(view);
#endif
LYXERR(Debug::GUI, "populating menu bar" << to_utf8(getMenubar().name()));
continue;
}
- Menu menu;
- expand(getMenubar(), menu, view->buffer());
-
GuiPopupMenu * qMenu = new GuiPopupMenu(view, *m, true);
view->menuBar()->addMenu(qMenu);
void Menus::macxMenuBarInit(GuiView * view)
{
+ // The Mac menubar initialisation must be done only once!
+ static bool done = false;
+ if (done)
+ return;
+ done = true;
+
/* Since Qt 4.2, the qt/mac menu code has special code for
specifying the role of a menu entry. However, it does not
work very well with our scheme of creating menus on demand,