]> git.lyx.org Git - features.git/commitdiff
Don't close child documents.
authorAbdelrazak Younes <younes@lyx.org>
Tue, 17 Jun 2008 14:53:08 +0000 (14:53 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Tue, 17 Jun 2008 14:53:08 +0000 (14:53 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25288 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiView.cpp

index df06f15bfc64096900c6c05f5e50285a136aebf2..6a3cdb28b5dd13f23e22b12e81730c99539340a2 100644 (file)
@@ -1727,7 +1727,12 @@ bool GuiView::closeBuffer(Buffer & buf, bool tolastopened)
        if (buf.masterBuffer() == &buf && tolastopened)
                LyX::ref().session().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;
 }