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
This commit is contained in:
Jean-Marc Lasgouttes 2010-11-29 16:06:43 +00:00
parent 4439f6144f
commit 87a0c25bc4

View 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