]> git.lyx.org Git - features.git/commitdiff
* create global Mac menu just before filling it (fixes #5217)
authorStefan Schimanski <sts@lyx.org>
Wed, 22 Oct 2008 18:14:30 +0000 (18:14 +0000)
committerStefan Schimanski <sts@lyx.org>
Wed, 22 Oct 2008 18:14:30 +0000 (18:14 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27023 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiApplication.cpp

index 413434aec12dcdfc61daa8eeaecc6134da7af0ac..9bae4886e4833781cc195c015901be1a5aaac6b6 100644 (file)
@@ -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();
 }