Community
Participate
Working Groups
notifyListeners(command, PRE_EXECUTE);
try {
command.execute();
if (getUndoLimit() > 0) {
undoable.push(command);
while (undoable.size() >= getUndoLimit()) {
if (getUndoLimit() > -1) {
while (undoable.size() > getUndoLimit()) {
((Command)undoable.remove(0)).dispose();
if (saveLocation > -1)
saveLocation--;
}
if (saveLocation > undoable.size())
saveLocation = -1; //The save point was somewhere in the redo stack
notifyListeners();
} finally {
notifyListeners(command, POST_EXECUTE);