]> 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>
Sun, 3 Sep 2017 16:35:37 +0000 (18:35 +0200)
commit4db40b11afa9ba708d576dd4fa7939c2a0ca320b
tree6a8af7154be8a36651fb0dd0c9caadf36647df7d
parent8ff22de938fd47cf126e628cd8b7fa0a482cedba
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
UndoGroupHelper: 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.

(cherry picked from commit 4eb9b50dc642a3532d8126a93571696b3db57640)
src/Undo.cpp
src/Undo.h
src/insets/InsetLabel.cpp
status.22x