From: Abdelrazak Younes Date: Fri, 7 Mar 2008 19:52:44 +0000 (+0000) Subject: Buffer::getLabelList(): Bug fix; only level 0 items are labels. X-Git-Tag: 1.6.10~5807 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=095fc3a2a1106ffd516330989ed3606734efcce7;p=features.git 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 --- diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 69dcb9395c..395af82d3b 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -1362,8 +1362,10 @@ void Buffer::getLabelList(vector & 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()); + } }