mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-11 11:08:41 +00:00
Fix TOC section detection.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32995 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
4221b1a7f4
commit
777717c33b
@ -1276,15 +1276,14 @@ Layout const & DocumentClass::htmlTOCLayout() const
|
|||||||
{
|
{
|
||||||
if (html_toc_section_.empty()) {
|
if (html_toc_section_.empty()) {
|
||||||
// we're going to look for the layout with the minimum toclevel
|
// 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 lit = begin();
|
||||||
TextClass::LayoutList::const_iterator const len = end();
|
TextClass::LayoutList::const_iterator const len = end();
|
||||||
int minlevel = 1000;
|
int minlevel = 1000;
|
||||||
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;
|
||||||
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;
|
continue;
|
||||||
lay = &*lit;
|
lay = &*lit;
|
||||||
minlevel = level;
|
minlevel = level;
|
||||||
|
Loading…
Reference in New Issue
Block a user