Don't consider unnumbered sections for tocdepth.

This commit is contained in:
Richard Heck 2013-05-03 17:48:48 -04:00
parent 33b0cff2f3
commit 5636646134

View File

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