]> git.lyx.org Git - lyx.git/commitdiff
* activate the view from the constructor. This makes sure that the
authorStefan Schimanski <sts@lyx.org>
Fri, 14 Mar 2008 23:29:11 +0000 (23:29 +0000)
committerStefan Schimanski <sts@lyx.org>
Fri, 14 Mar 2008 23:29:11 +0000 (23:29 +0000)
  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

src/frontends/qt4/GuiApplication.cpp
src/frontends/qt4/GuiView.cpp

index 69b3f485227233ac36415f7c16f4bb56f15b7512..69e5f09a28b06979f2409e807f456a75494e25bd 100644 (file)
@@ -393,8 +393,7 @@ void GuiApplication::createView(QString const & geometry_arg)
        // register view
        views_[id] = view;
        updateIds(views_, view_ids_);
-       
-       theLyXFunc().setLyXView(view);
+
        view->show();
        if (!geometry_arg.isEmpty()) {
 #ifdef Q_WS_WIN
index 132ef9392c07bcc6ea4237b89e24a206088e6b5f..ba6b33dd0c7f6c7893996710ecffbc9c1e77f21f 100644 (file)
@@ -277,6 +277,11 @@ GuiView::GuiView(int id)
        // GuiToolbars *must* be initialised before the menu bar.
        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.
        guiApp->menus().fillMenuBar(menuBar(), this);