]> git.lyx.org Git - lyx.git/commitdiff
Fix undo after breaking a nested paragraph
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 23 Nov 2018 15:53:53 +0000 (16:53 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sun, 16 Dec 2018 21:00:36 +0000 (22:00 +0100)
We have to take into account that Buffer::updateBuffer can modify the document.

Fix bug #11292.

(cherry picked from commit 57feb0fed0c078903900aaea069c49207c8cb9ac)

src/frontends/qt4/GuiApplication.cpp
status.23x

index 79f14d64582840a3bf00600734b47369b3429a72..3c6e137e46776f93cc98933560161c255c2c199b 100644 (file)
@@ -1403,11 +1403,13 @@ DispatchResult const & GuiApplication::dispatch(FuncRequest const & cmd)
                // This handles undo groups automagically
                UndoGroupHelper ugh(buffer);
                dispatch(cmd, dr);
+               // redraw the screen at the end (first of the two drawing steps).
+               // This is done unless explicitly requested otherwise.
+               // This code is kept inside the undo group because updateBuffer
+               // can create undo actions (see #11292)
+               updateCurrentView(cmd, dr);
        }
 
-       // redraw the screen at the end (first of the two drawing steps).
-       // This is done unless explicitly requested otherwise
-       updateCurrentView(cmd, dr);
        d->dispatch_result_ = dr;
        return d->dispatch_result_;
 }
index 544bc1a1b61a0903e7f3c539424d323fbace6f12..97a9a3c2cbecfc15cf32f19c21f8432d51fb5913 100644 (file)
@@ -65,6 +65,9 @@ What's new
 
 - Fix broken space dialog in mathed (bug 7747).
 
+- Fix undo in some cases involving nesting (bug 11292).
+
+
 * INTERNALS