* activate the view from the constructor. This makes sure that the

special menu item for Mac see the "right" status of the LFUNs.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23738 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Stefan Schimanski 2008-03-14 23:29:11 +00:00
parent 25e0113c9c
commit 4e223167ff
2 changed files with 6 additions and 2 deletions

View File

@ -393,8 +393,7 @@ void GuiApplication::createView(QString const & geometry_arg)
// register view // register view
views_[id] = view; views_[id] = view;
updateIds(views_, view_ids_); updateIds(views_, view_ids_);
theLyXFunc().setLyXView(view);
view->show(); view->show();
if (!geometry_arg.isEmpty()) { if (!geometry_arg.isEmpty()) {
#ifdef Q_WS_WIN #ifdef Q_WS_WIN

View File

@ -277,6 +277,11 @@ GuiView::GuiView(int id)
// GuiToolbars *must* be initialised before the menu bar. // GuiToolbars *must* be initialised before the menu bar.
d.toolbars_ = new GuiToolbars(*this); d.toolbars_ = new GuiToolbars(*this);
// set ourself as the current view. This is needed for the menu bar
// filling, at least for the static special menu item on Mac. Otherwise
// they are greyed out.
theLyXFunc().setLyXView(this);
// Fill up the menu bar. // Fill up the menu bar.
guiApp->menus().fillMenuBar(menuBar(), this); guiApp->menus().fillMenuBar(menuBar(), this);