From: Richard Heck Date: Fri, 3 May 2013 21:48:48 +0000 (-0400) Subject: Don't consider unnumbered sections for tocdepth. X-Git-Tag: 2.1.0beta1~307 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=56366461348c05d1c5e07735c416784609d36251;p=features.git Don't consider unnumbered sections for tocdepth. --- diff --git a/src/TextClass.cpp b/src/TextClass.cpp index 89813ed399..b55e8a2f0a 100644 --- a/src/TextClass.cpp +++ b/src/TextClass.cpp @@ -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;