From b23058c5786448b5c6473c92585d1a753cdb1fad Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Wed, 15 Oct 2008 08:42:43 +0000 Subject: [PATCH] Fix bug http://bugzilla.lyx.org/show_bug.cgi?id=5319 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26913 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiView.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index 567680d324..e21be78af7 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -1756,7 +1756,11 @@ bool GuiView::closeBuffer(Buffer & buf, bool tolastopened) if (buf.isClean() || buf.paragraphs().empty()) { if (buf.masterBuffer() == &buf && tolastopened) theSession().lastOpened().add(buf.fileName()); - theBufferList().release(&buf); + if (buf.parent()) + // Don't close child documents. + removeWorkArea(d.current_work_area_); + else + theBufferList().release(&buf); return true; } // Switch to this Buffer. -- 2.39.2