From 777717c33b42ce6f210ef2da13da0bb23a9396d2 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Tue, 12 Jan 2010 19:51:32 +0000 Subject: [PATCH] Fix TOC section detection. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32995 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/TextClass.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/TextClass.cpp b/src/TextClass.cpp index 5e077de161..7f7b694595 100644 --- a/src/TextClass.cpp +++ b/src/TextClass.cpp @@ -1276,15 +1276,14 @@ Layout const & DocumentClass::htmlTOCLayout() const { if (html_toc_section_.empty()) { // we're going to look for the layout with the minimum toclevel - // number > 0, because we don't want Part. - // we'll take the first one, just because. TextClass::LayoutList::const_iterator lit = begin(); TextClass::LayoutList::const_iterator const len = end(); int minlevel = 1000; Layout const * lay = NULL; for (; lit != len; ++lit) { int const level = lit->toclevel; - if (level > 0 && (level == Layout::NOT_IN_TOC || level >= minlevel)) + // we don't want Part + if (level == Layout::NOT_IN_TOC || level < 0 || level >= minlevel) continue; lay = &*lit; minlevel = level; -- 2.39.2