* 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
This commit is contained in:
Stefan Schimanski 2008-10-22 18:14:30 +00:00
parent eb80fcdf69
commit 90ea041ada

View 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();
}