]> git.lyx.org Git - features.git/commitdiff
When handling mouse events, make the undo group a bit larger
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 16 Mar 2016 09:27:32 +0000 (10:27 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 16 Mar 2016 17:33:39 +0000 (18:33 +0100)
notifyCursorLeave can delete empty insets in mathed.

Fixes bug #10022.

src/BufferView.cpp

index 8783d47910e353e00f3b557c6a3035ae7a68245c..a267410f2c10004db83cbf0e11945b72dd7f328b 100644 (file)
@@ -2225,8 +2225,6 @@ void BufferView::mouseEventDispatch(FuncRequest const & cmd0)
        if (!inset || !cur.result().dispatched())
                cur.dispatch(cmd);
 
-       cur.endUndoGroup();
-
        // Notify left insets
        if (cur != old) {
                bool badcursor = old.fixIfBroken() | cur.fixIfBroken();
@@ -2235,6 +2233,8 @@ void BufferView::mouseEventDispatch(FuncRequest const & cmd0)
                        cursor().fixIfBroken();
        }
 
+       cur.endUndoGroup();
+
        // Do we have a selection?
        theSelection().haveSelection(cursor().selection());