]> git.lyx.org Git - lyx.git/blobdiff - src/buffer_funcs.C
add GuiView parent to QToc for proper memory management.
[lyx.git] / src / buffer_funcs.C
index aa01afe6d7c4ec3ecbd2b5861fc0431d7d8cbb79..35e977fc2e47bd100a02b5ff059c3d659d6a40f2 100644 (file)
@@ -214,7 +214,6 @@ Buffer * newFile(string const & filename, string const & templatename,
 
        b->setReadonly(false);
        b->fully_loaded(true);
-       b->updateDocLang(b->params().language);
 
        return b;
 }
@@ -703,7 +702,8 @@ void updateLabels(Buffer const & buf, bool childonly)
 
 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.structureChanged();
        }