Avoid undo grouping error when using Undo or Redo. This is because undo grouping has to be done also when putting stuff on the undo/redo stack.

The solution is just to remove special code :)

I think there is a ticket for this, but I cannot find it.

Abdel, could you please validate my thinking?


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31869 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2009-11-06 13:32:58 +00:00
parent db93173557
commit b67cd61d3c

View File

@ -1216,7 +1216,6 @@ bool BufferView::dispatch(FuncRequest const & cmd)
// We'll set this back to false if need be. // We'll set this back to false if need be.
bool dispatched = true; bool dispatched = true;
if (cmd.action != LFUN_UNDO && cmd.action != LFUN_REDO)
buffer_.undo().beginUndoGroup(); buffer_.undo().beginUndoGroup();
switch (cmd.action) { switch (cmd.action) {
@ -1880,7 +1879,6 @@ bool BufferView::dispatch(FuncRequest const & cmd)
break; break;
} }
if (cmd.action != LFUN_UNDO && cmd.action != LFUN_REDO)
buffer_.undo().endUndoGroup(); buffer_.undo().endUndoGroup();
return dispatched; return dispatched;
} }