Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 232909
Collapse All | Expand All

(-)src/org/eclipse/gef/commands/CommandStack.java (-3 / +3 lines)
Lines 147-154 Link Here
147
	notifyListeners(command, PRE_EXECUTE);
147
	notifyListeners(command, PRE_EXECUTE);
148
	try {
148
	try {
149
		command.execute();
149
		command.execute();
150
		if (getUndoLimit() > 0) {
150
		undoable.push(command);
151
			while (undoable.size() >= getUndoLimit()) {
151
		if (getUndoLimit() > -1) {
152
			while (undoable.size() > getUndoLimit()) {
152
				((Command)undoable.remove(0)).dispose();
153
				((Command)undoable.remove(0)).dispose();
153
				if (saveLocation > -1)
154
				if (saveLocation > -1)
154
					saveLocation--;
155
					saveLocation--;
Lines 156-162 Link Here
156
		}
157
		}
157
		if (saveLocation > undoable.size())
158
		if (saveLocation > undoable.size())
158
			saveLocation = -1; //The save point was somewhere in the redo stack
159
			saveLocation = -1; //The save point was somewhere in the redo stack
159
		undoable.push(command);
160
		notifyListeners();
160
		notifyListeners();
161
	} finally {
161
	} finally {
162
		notifyListeners(command, POST_EXECUTE);
162
		notifyListeners(command, POST_EXECUTE);

Return to bug 232909