]> git.lyx.org Git - features.git/commitdiff
Buffer::getLabelList(): Bug fix; only level 0 items are labels.
authorAbdelrazak Younes <younes@lyx.org>
Fri, 7 Mar 2008 19:52:44 +0000 (19:52 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Fri, 7 Mar 2008 19:52:44 +0000 (19:52 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23542 a592a061-630c-0410-9148-cb99ea01b6c8

src/Buffer.cpp

index 69dcb9395c96894613d3a7442831a0343b968ecb..395af82d3b08366999a91d95d88389aa31ac62f8 100644 (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());
+       }
 }