From 0595b725f7c3d621b7089d90df766987b36b2c56 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Fri, 5 Sep 2008 12:39:43 +0000 Subject: [PATCH] GuiApplication::resetGui(): Recreate Mac nenubar. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26306 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiApplication.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/frontends/qt4/GuiApplication.cpp b/src/frontends/qt4/GuiApplication.cpp index 32daba66f8..6c05a87e40 100644 --- a/src/frontends/qt4/GuiApplication.cpp +++ b/src/frontends/qt4/GuiApplication.cpp @@ -895,12 +895,16 @@ void GuiApplication::resetGui() // Gives some error box here. return; +#ifdef Q_WS_MACX + delete d->global_menubar_; + // Create the global default menubar which is shown for the dialogs + // and if no GuiView is visible. + d->global_menubar_ = new GlobalMenuBar(); + // 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->global_menubar_->clear(); - d->menus_.fillMenuBar(d->global_menubar_, 0, true); - } + d->menus_.fillMenuBar(d->global_menubar_, 0, true); +#endif QHash::iterator it; for (it = d->views_.begin(); it != d->views_.end(); ++it) {