]> git.lyx.org Git - lyx.git/blobdiff - src/buffer_funcs.C
remove redundant lyxerr.debugging checks; macro LYXERR already checks whether the...
[lyx.git] / src / buffer_funcs.C
index 5bb3ed0b0f6343d64e942c139eba72a20b29fa2d..77c1af818d97c8b0de92b6519d9c94bb89c6c5bb 100644 (file)
@@ -695,8 +695,19 @@ void updateLabels(Buffer const & buf, bool childonly)
                }
        }
 
-       const_cast<Buffer &>(buf).tocBackend().update();
+       Buffer & cbuf = const_cast<Buffer &>(buf);
+       cbuf.tocBackend().update();
+       cbuf.structureChanged();
 }
 
 
+void checkBufferStructure(Buffer & buffer, ParIterator const & par_it)
+{
+       if (par_it->layout()->labeltype == LABEL_COUNTER
+               && par_it->layout()->toclevel != LyXLayout::NOT_IN_TOC) {
+               buffer.tocBackend().updateItem(par_it);
+               buffer.structureChanged();
+       }
+}
+
 } // namespace lyx