From e3b352deb09502f232708e3fea839893d166c10b Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sat, 4 Apr 2009 23:00:39 +0000 Subject: Added AddUndoAction call for adding application actions into undo stack. --- src/CellBuffer.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/CellBuffer.cxx') diff --git a/src/CellBuffer.cxx b/src/CellBuffer.cxx index 0e9ae6950..ccb357a41 100644 --- a/src/CellBuffer.cxx +++ b/src/CellBuffer.cxx @@ -424,6 +424,9 @@ void UndoHistory::AppendAction(actionType at, int position, char *data, int leng } else if (!actions[currentAction].mayCoalesce) { // Not allowed to coalesce if this set currentAction++; + } else if (at == containerAction) { + // Not allowed to coalesce container actions + currentAction++; } else if (at == removeAction) { if ((lengthData == 1) || (lengthData == 2)){ if ((position + lengthData) == actPrevious.position) { @@ -862,6 +865,11 @@ void CellBuffer::EndUndoAction() { uh.EndUndoAction(); } +void CellBuffer::AddUndoAction(int token) { + bool startSequence; + uh.AppendAction(containerAction, token, 0, 0, startSequence); +} + void CellBuffer::DeleteUndoHistory() { uh.DeleteUndoHistory(); } -- cgit v1.2.3