diff --git a/src/frontends/qt4/GuiApplication.cpp b/src/frontends/qt4/GuiApplication.cpp index 59c99e0d23..ade73a6dd9 100644 --- a/src/frontends/qt4/GuiApplication.cpp +++ b/src/frontends/qt4/GuiApplication.cpp @@ -1411,6 +1411,10 @@ bool GuiApplication::closeAllViews() if (d->views_.empty()) return true; + // When a view/window was closed before without quitting LyX, there + // are already entries in the lastOpened list. + theSession().lastOpened().clear(); + QList views = d->views_.values(); foreach (GuiView * view, views) { if (!view->close()) diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index a3532d1c6d..d5ebfbd4cc 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -536,10 +536,6 @@ void GuiView::closeEvent(QCloseEvent * close_event) GuiWorkArea * active_wa = currentMainWorkArea(); setCurrentWorkArea(active_wa); - // When a view/window was closed before without quitting LyX, there - // are already entries in the lastOpened list. - theSession().lastOpened().clear(); - int splitter_count = d.splitter_->count(); for (; splitter_count; --splitter_count) { TabWorkArea * twa = d.tabWorkArea(0);