Fix this bug reported by Bernhard Roider:

steps to reproduce:
- create a new document
- change the document class to article (AMS)
- change the current layout to theorem, definition, proposition, ....
- try to write something -> boom



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17449 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-03-15 19:16:53 +00:00
parent 160c6ef3e9
commit f752d776f6

View File

@ -703,7 +703,8 @@ void updateLabels(Buffer const & buf, bool childonly)
void checkBufferStructure(Buffer & buffer, ParIterator const & par_it) void checkBufferStructure(Buffer & buffer, ParIterator const & par_it)
{ {
if (par_it->layout()->labeltype == LABEL_COUNTER) { if (par_it->layout()->labeltype == LABEL_COUNTER
&& par_it->layout()->toclevel != LyXLayout::NOT_IN_TOC) {
buffer.tocBackend().updateItem(par_it); buffer.tocBackend().updateItem(par_it);
buffer.structureChanged(); buffer.structureChanged();
} }