// TODO: Make more readable. public override void Execute() { base.Execute(); UndoManager manager = DrawingEditor.UndoManager; if (manager == null || manager.Undoable == false) { return; } IUndoActivity lastUndoable = manager.PopUndo(); // Execute undo bool hasBeenUndone = lastUndoable.Undo(); // Add to redo if (hasBeenUndone && lastUndoable.Redoable) { manager.PushRedo(lastUndoable); } //lastUndoable.getDrawingView().checkDamage(); //DrawingEditor.fre getDrawingEditor().figureSelectionChanged(lastUndoable.getDrawingView()); }