Fix bug when retrieving allRelatives() of a buffer (when invoked from a

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
This commit is contained in:
Tommaso Cucinotta 2011-03-04 22:14:52 +00:00
parent 299745b635
commit aa431bf8bf

View File

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