]> git.lyx.org Git - lyx.git/commitdiff
Fix bug http://bugzilla.lyx.org/show_bug.cgi?id=5319
authorAbdelrazak Younes <younes@lyx.org>
Wed, 15 Oct 2008 08:42:43 +0000 (08:42 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Wed, 15 Oct 2008 08:42:43 +0000 (08:42 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26913 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiView.cpp

index 567680d3247a87437ddedaea289512fd79bcd563..e21be78af7ed620a0409f29e31188c57823e73d9 100644 (file)
@@ -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.