From: Jean-Marc Lasgouttes Date: Wed, 16 Mar 2016 09:27:32 +0000 (+0100) Subject: When handling mouse events, make the undo group a bit larger X-Git-Tag: 2.2.0rc1~82 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=98883304e2d5f68f5be8124423295aecb43e3463;p=features.git When handling mouse events, make the undo group a bit larger notifyCursorLeave can delete empty insets in mathed. Fixes bug #10022. --- diff --git a/src/BufferView.cpp b/src/BufferView.cpp index 8783d47910..a267410f2c 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -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());