mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
Fix bug #5458 (try 2): File reopens at LyX-start even though it was closed in previous session.
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
This commit is contained in:
parent
19502b9035
commit
99dc01f79b
@ -1411,6 +1411,10 @@ bool GuiApplication::closeAllViews()
|
|||||||
if (d->views_.empty())
|
if (d->views_.empty())
|
||||||
return true;
|
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();
|
QList<GuiView *> views = d->views_.values();
|
||||||
foreach (GuiView * view, views) {
|
foreach (GuiView * view, views) {
|
||||||
if (!view->close())
|
if (!view->close())
|
||||||
|
@ -536,10 +536,6 @@ void GuiView::closeEvent(QCloseEvent * close_event)
|
|||||||
GuiWorkArea * active_wa = currentMainWorkArea();
|
GuiWorkArea * active_wa = currentMainWorkArea();
|
||||||
setCurrentWorkArea(active_wa);
|
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();
|
int splitter_count = d.splitter_->count();
|
||||||
for (; splitter_count; --splitter_count) {
|
for (; splitter_count; --splitter_count) {
|
||||||
TabWorkArea * twa = d.tabWorkArea(0);
|
TabWorkArea * twa = d.tabWorkArea(0);
|
||||||
|
Loading…
Reference in New Issue
Block a user