Fix bug 4123:

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
This commit is contained in:
Abdelrazak Younes 2007-08-19 10:48:16 +00:00
parent d39896da58
commit 8ad113c30a

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