]> git.lyx.org Git - lyx.git/commitdiff
Don't consider unnumbered sections for tocdepth.
authorRichard Heck <rgheck@lyx.org>
Fri, 3 May 2013 21:48:48 +0000 (17:48 -0400)
committerRichard Heck <rgheck@lyx.org>
Fri, 3 May 2013 21:49:19 +0000 (17:49 -0400)
src/TextClass.cpp

index 89813ed39940f8029d1d005851c2802fe6f0d062..b55e8a2f0a4863acad97e02bd82e38059dcf4dab 100644 (file)
@@ -1536,8 +1536,9 @@ Layout const & DocumentClass::getTOCLayout() const
        Layout const * lay = NULL;
        for (; lit != len; ++lit) {
                int const level = lit->toclevel;
-               // we don't want Part
-               if (level == Layout::NOT_IN_TOC || level < 0 || level >= minlevel)
+               // we don't want Part or unnumbered sections
+               if (level == Layout::NOT_IN_TOC || level < 0 
+                   || level >= minlevel || lit->counter.empty())
                        continue;
                lay = &*lit;
                minlevel = level;