commit d15a96d93d0af675a88cfa90ae1a16f161914385
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Tue Mar 8 16:16:50 2022 +0100

    updateBuffer needs an undo group
    
    Otherwise warning messages appear when loading a file that contains
    missing modules, for example (which may require to adjust depths in
    document).
---
 src/Buffer.cpp |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/Buffer.cpp b/src/Buffer.cpp
index 5295a4b..1867e75 100644
--- a/src/Buffer.cpp
+++ b/src/Buffer.cpp
@@ -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();
-- 
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to