keyboard shortcut for Undo, plus gratuitous use of ternary operator
[potlatch2.git] / net / systemeD / halcyon / connection / MainUndoStack.as
index 5f9790d50d001ceacd9211783c3d860cddd0c0b9..4e7fdb7724148efaf2f792e8de213d88b26fd42e 100644 (file)
@@ -68,6 +68,7 @@ package net.systemeD.halcyon.connection {
         }
         
         public function undo():void {
+                       if (!undoActions.length) { return; }
             var action:UndoableAction = undoActions.pop();
             trace("undoing "+action);
             action.undoAction();
@@ -77,6 +78,7 @@ package net.systemeD.halcyon.connection {
         }
         
         public function redo():void {
+                       if (!redoActions.length) { return; }
             var action:UndoableAction = redoActions.pop();
             trace("redoing "+action);
             action.doAction();