]> git.lyx.org Git - features.git/blobdiff - src/Buffer.cpp
Cmake key-tests: Adapted to changed shortcuts
[features.git] / src / Buffer.cpp
index 0f7ecb08d77b738e4ff106cf273762ebc61edd4b..1867e75513c6ac1f98553914d5e3a1a5536c562d 100644 (file)
@@ -4935,6 +4935,10 @@ void Buffer::updateBuffer(UpdateScope scope, UpdateType utype) const
 {
        LBUFERR(!text().paragraphs().empty());
 
+       // This can be called when loading a file, so that there be no
+       // open undo group.
+       UndoGroupHelper ugh(const_cast<Buffer *>(this));
+
        // Use the master text class also for child documents
        Buffer const * const master = masterBuffer();
        DocumentClass const & textclass = master->params().documentClass();
@@ -5158,7 +5162,10 @@ void Buffer::Impl::setLabel(ParIterator & it, UpdateType utype) const
        switch(layout.labeltype) {
        case LABEL_ITEMIZE: {
                par.params().labelString(
-                       bp.user_defined_bullet(par.itemdepth).getUnicode());
+                       (par.itemdepth < 4)
+                                       ? bp.user_defined_bullet(par.itemdepth).getLabel()
+                                         // Display fallback for too deeply nested items
+                                       : bformat(from_ascii("[?%1$d]"), int(par.itemdepth + 1)));
                break;
        }