b->setReadonly(false);
b->fully_loaded(true);
- b->updateDocLang(b->params().language);
return b;
}
}
}
- 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