]> git.lyx.org Git - features.git/commitdiff
Fix bug when retrieving allRelatives() of a buffer (when invoked from a
authorTommaso Cucinotta <tommaso@lyx.org>
Fri, 4 Mar 2011 22:14:52 +0000 (22:14 +0000)
committerTommaso Cucinotta <tommaso@lyx.org>
Fri, 4 Mar 2011 22:14:52 +0000 (22:14 +0000)
child, the returned list had no master and twice the child itself).
(was causing misbehavior in Advanced Find & Replace with scope=Document).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37852 a592a061-630c-0410-9148-cb99ea01b6c8

src/Buffer.cpp

index 686485bd469465205b28fb82def094ccf718d3f6..d2eff530f835197ca76ef1481d0c3e2f9177c98c 100644 (file)
@@ -2543,7 +2543,7 @@ Buffer const * Buffer::parent() const
 ListOfBuffers Buffer::allRelatives() const
 {
        ListOfBuffers lb = masterBuffer()->getDescendents();
-       lb.push_front(const_cast<Buffer *>(this));
+       lb.push_front(const_cast<Buffer *>(masterBuffer()));
        return lb;
 }