| 60 | } |
| 61 | |
| 62 | void UndoManager::addValue(int _property) |
| 63 | { |
| 64 | setUnsaved(true); |
| 65 | |
| 66 | if ((_property != PR_DEFAULT) && (_property == mLastProperty)) |
| 67 | { |
| 68 | delete mOperations.Front(); |
| 69 | mOperations.PopFirst(); |
| 70 | mOperations.Push(mEditorWidgets->savexmlDocument()); |
| 71 | return; |
| 72 | } |
| 73 | |
| 74 | mLastProperty = _property; |
| 75 | |
| 76 | if (mPosition != 0) |
| 77 | { |
| 78 | mLastProperty = PR_DEFAULT; |
| 79 | while (mPosition) |
| 80 | { |
| 81 | delete mOperations.Front(); |
| 82 | mOperations.PopFirst(); |
| 83 | mPosition--; |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | if (mOperations.IsFull()) |
| 88 | delete mOperations.Back(); |
| 89 | mOperations.Push(mEditorWidgets->savexmlDocument()); |
| 90 | mPosition = 0; |
| 91 | } |
| 92 | |
| 93 | void UndoManager::commandUndo(const MyGUI::UString& _commandName, bool& _result) |
| 94 | { |
no test coverage detected