From: Abdelrazak Younes Date: Wed, 15 Oct 2008 08:42:43 +0000 (+0000) Subject: Fix bug http://bugzilla.lyx.org/show_bug.cgi?id=5319 X-Git-Tag: 1.6.10~3028 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=b23058c5786448b5c6473c92585d1a753cdb1fad;p=lyx.git 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 --- 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.