git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26913 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-10-15 08:42:43 +00:00
parent 2ebb85daf9
commit b23058c578

View 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.