Buffer::getLabelList(): Bug fix; only level 0 items are labels.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23542 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-03-07 19:52:44 +00:00
parent 5da55588f2
commit 095fc3a2a1

View File

@ -1362,8 +1362,10 @@ void Buffer::getLabelList(vector<docstring> & list) const
Toc & toc = d->toc_backend.toc("label");
TocIterator toc_it = toc.begin();
TocIterator end = toc.end();
for (; toc_it != end; ++toc_it)
list.push_back(toc_it->str());
for (; toc_it != end; ++toc_it) {
if (toc_it->depth() == 0)
list.push_back(toc_it->str());
}
}