]> git.lyx.org Git - features.git/commitdiff
Fix bug #5458 (try 2): File reopens at LyX-start even though it was closed in previou...
authorVincent van Ravesteijn <vfr@lyx.org>
Sat, 9 May 2009 19:59:53 +0000 (19:59 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Sat, 9 May 2009 19:59:53 +0000 (19:59 +0000)
We should of course clear the list before closing each of the views. Otherwise, the second view will remove the files from the first view from the list.

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

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

index 59c99e0d23a10887b79d83874109c11fcbab3f11..ade73a6dd92abff502eb4b98f60fc8156dc783ad 100644 (file)
@@ -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<GuiView *> views = d->views_.values();
        foreach (GuiView * view, views) {
                if (!view->close())
index a3532d1c6ddadf73b7b6101a4d82d474ed1cb17b..d5ebfbd4cc538293e00ccf42dc7964f347d90c93 100644 (file)
@@ -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);