]> git.lyx.org Git - features.git/commitdiff
Avoid undo grouping error when using Undo or Redo. This is because undo grouping...
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 6 Nov 2009 13:32:58 +0000 (13:32 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 6 Nov 2009 13:32:58 +0000 (13:32 +0000)
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

index bbd7395e5d7382cc5bb514e8b5e5f4ea2f301672..5bac1e182853def008c3a51fba510c19b38bd1c6 100644 (file)
@@ -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;
 }