From 048ac3e82f283f62ff10db4c4e68481d67417201 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Tue, 25 Oct 2005 13:43:50 +0000 Subject: [PATCH] fix TOC when no section headings are defined in the layout git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10575 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 4 ++++ src/toc.C | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 872cf0db6f..48abca0b57 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2005-10-25 Jean-Marc Lasgouttes + + * toc.C (getTocList): skip paragraphs which toclevel is NOT_IN_TOC. + 2005-10-25 Jean-Marc Lasgouttes * text.C (insertChar): do not reset boundary (bug 2061) diff --git a/src/toc.C b/src/toc.C index 0a17d5a2c1..d90cab6e37 100644 --- a/src/toc.C +++ b/src/toc.C @@ -122,7 +122,8 @@ TocList const getTocList(Buffer const & buf) /// now the toc entry for the paragraph int const toclevel = pit->layout()->toclevel; - if (toclevel >= min_toclevel + if (toclevel != LyXLayout::NOT_IN_TOC + && toclevel >= min_toclevel && toclevel <= bufparams.tocdepth) { // insert this into the table of contents if (tocstring.empty()) -- 2.39.5