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).
This commit is contained in:
Jean-Marc Lasgouttes 2022-03-08 16:16:50 +01:00
parent 955308de57
commit d15a96d93d

View 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();