]> git.lyx.org Git - features.git/commitdiff
Fix bug 4123:
authorAbdelrazak Younes <younes@lyx.org>
Sun, 19 Aug 2007 10:48:16 +0000 (10:48 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Sun, 19 Aug 2007 10:48:16 +0000 (10:48 +0000)
http://bugzilla.lyx.org/show_bug.cgi?id=4123

* GuiView:
- closeEvent(): set quitting=true only when quitting. I don't know why and how this was changed but it was clearly wrong.
- update_view_state_qt(): only update when focus is in. Make sure this is the current LyXView.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19643 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiView.cpp

index 7c2c2f14f6b22b8ed9aa552316a8b1ba0888b9dd..dfb14ac1c82d1e7d07a55e40efc55a55c76beb46 100644 (file)
@@ -303,13 +303,14 @@ void GuiView::closeEvent(QCloseEvent * close_event)
 
        theApp()->gui().unregisterView(id());
        if (!theApp()->gui().viewIds().empty()) {
-               quitting = true;
                // Just close the window and do nothing else if this is not the
                // last window.
                close_event->accept();
                return;
        }
 
+       quitting = true;
+
        if (view()->buffer()) {
                // save cursor position for opened files to .lyx/session
                // only bottom (whole doc) level pit and pos is saved.
@@ -601,6 +602,9 @@ void GuiView::focus_command_widget()
 
 void GuiView::update_view_state_qt()
 {
+       if (!hasFocus())
+               return;
+       theLyXFunc().setLyXView(this);
        statusBar()->showMessage(toqstr(theLyXFunc().viewStatusMessage()));
        statusbar_timer_.stop();
 }