From: Stefan Schimanski Date: Wed, 22 Oct 2008 18:14:30 +0000 (+0000) Subject: * create global Mac menu just before filling it (fixes #5217) X-Git-Tag: 1.6.10~2928 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=90ea041ada7d4319c62d5f72e392221207d3dc3f;p=features.git * create global Mac menu just before filling it (fixes #5217) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27023 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/qt4/GuiApplication.cpp b/src/frontends/qt4/GuiApplication.cpp index 413434aec1..9bae4886e4 100644 --- a/src/frontends/qt4/GuiApplication.cpp +++ b/src/frontends/qt4/GuiApplication.cpp @@ -593,15 +593,7 @@ public: struct GuiApplication::Private { - Private() - : language_model_(0), global_menubar_(0) - { -#ifdef Q_WS_MACX - // Create the global default menubar which is shown for the dialogs - // and if no GuiView is visible. - global_menubar_ = new GlobalMenuBar(); -#endif - } + Private(): language_model_(0), global_menubar_(0) {} /// QSortFilterProxyModel * language_model_; @@ -1090,10 +1082,13 @@ void GuiApplication::execBatchCommands() // Gives some error box here. return; - // init the global menubar on Mac. This must be done after the session - // was recovered to know the "last files". - if (d->global_menubar_) - d->menus_.fillMenuBar(d->global_menubar_, 0, true); +#ifdef Q_WS_MACX + // Create the global default menubar which is shown for the dialogs + // and if no GuiView is visible. + // This must be done after the session was recovered to know the "last files". + d->global_menubar_ = new GlobalMenuBar(); + d->menus_.fillMenuBar(d->global_menubar_, 0, true); +#endif lyx::execBatchCommands(); }