From b67cd61d3c872af026f601ed80407507b36d67f5 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Fri, 6 Nov 2009 13:32:58 +0000 Subject: [PATCH] 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 --- src/BufferView.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/BufferView.cpp b/src/BufferView.cpp index bbd7395e5d..5bac1e1828 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -1216,8 +1216,7 @@ bool BufferView::dispatch(FuncRequest const & cmd) // We'll set this back to false if need be. bool dispatched = true; - if (cmd.action != LFUN_UNDO && cmd.action != LFUN_REDO) - buffer_.undo().beginUndoGroup(); + buffer_.undo().beginUndoGroup(); switch (cmd.action) { @@ -1880,8 +1879,7 @@ bool BufferView::dispatch(FuncRequest const & cmd) break; } - if (cmd.action != LFUN_UNDO && cmd.action != LFUN_REDO) - buffer_.undo().endUndoGroup(); + buffer_.undo().endUndoGroup(); return dispatched; } -- 2.39.2