]> git.lyx.org Git - features.git/commit
Use the proper buffer when recording undo
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 4 Jul 2017 14:34:34 +0000 (16:34 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 4 Jul 2017 14:34:34 +0000 (16:34 +0200)
commit4eb9b50dc642a3532d8126a93571696b3db57640
treec63cdec97b6c198737afeaae0af27348728f9be2
parentfd5a950d7fbf528021790cfaba23115b4035c099
Use the proper buffer when recording undo

The code in InsetLabel::updateReferences code changes reference insets
in potentially several buffers. When recording undo, it is important
to use the right undo stack, otherwise crashes can ensue.

Once it is done, it is neccessary to create undo groups as needed.
This is done using UndoGroupHelper. This demonstrates a shortcoming of
UndoGroup helper: if a buffer is encountered in two seperate
occasions, two undo groups will be created for this buffer. This is
not correct.

Fixes bug #10643.
src/Undo.cpp
src/Undo.h
src/insets/InsetLabel.cpp