]> git.lyx.org Git - features.git/commitdiff
Fix missing undo group when doing the following:
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 29 Nov 2010 16:06:43 +0000 (16:06 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 29 Nov 2010 16:06:43 +0000 (16:06 +0000)
* create math inset
* enter macro name \ww
* press left arrow to re-enter the macro name inset, add a third 'w'.
* when leaving the inset is is updated through notifyCursorLeaves, but no undo group is active

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36596 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiApplication.cpp

index 641431a91fe2c48b2e593e8e65d028250aedffd5..124e0baf382d7196c276bcb9a17a7f4adde9ca10 100644 (file)
@@ -1647,11 +1647,14 @@ void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr)
                bv->cursor().dispatch(cmd);
        
                // notify insets we just left
+               // FIXME: move this code to Cursor::dispatch
                if (bv->cursor() != old) {
+                       old.beginUndoGroup();
                        old.fixIfBroken();
                        bool badcursor = notifyCursorLeavesOrEnters(old, bv->cursor());
                        if (badcursor)
                                bv->cursor().fixIfBroken();
+                       old.endUndoGroup();
                }
        
                // update completion. We do it here and not in