From: Jean-Marc Lasgouttes Date: Mon, 29 Nov 2010 16:06:43 +0000 (+0000) Subject: Fix missing undo group when doing the following: X-Git-Tag: 2.0.0~1617 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=87a0c25bc4e2debd0bf0e2b5fca30332588a694b;p=features.git Fix missing undo group when doing the following: * 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 --- diff --git a/src/frontends/qt4/GuiApplication.cpp b/src/frontends/qt4/GuiApplication.cpp index 641431a91f..124e0baf38 100644 --- a/src/frontends/qt4/GuiApplication.cpp +++ b/src/frontends/qt4/GuiApplication.cpp @@ -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