]> git.lyx.org Git - features.git/commitdiff
BufferView::mouseDispatch: make sure to create an undo group
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Sep 2008 13:44:54 +0000 (13:44 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Sep 2008 13:44:54 +0000 (13:44 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26440 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferView.cpp

index 42420b92d191f468e1a7409cf0bbe33510c1cfe0..b2e21ba79d2e47f8f6a3b0c839214596863423d3 100644 (file)
@@ -1617,6 +1617,8 @@ void BufferView::mouseEventDispatch(FuncRequest const & cmd0)
        // Put anchor at the same position.
        cur.resetAnchor();
 
+       cur.beginUndoGroup();
+
        // Try to dispatch to an non-editable inset near this position
        // via the temp cursor. If the inset wishes to change the real
        // cursor it has to do so explicitly by using
@@ -1629,6 +1631,8 @@ void BufferView::mouseEventDispatch(FuncRequest const & cmd0)
        if (!inset || !cur.result().dispatched())
                cur.dispatch(cmd);
 
+       cur.endUndoGroup();
+
        // Notify left insets
        if (cur != old) {
                old.fixIfBroken();