keyboard shortcut for Undo, plus gratuitous use of ternary operator
[potlatch2.git] / net / systemeD / potlatch2 / controller / SelectedWayNode.as
index 502644b0579547ed2709a3b61fe753111565f4c8..be414df2b4593357620117187d0a05710dd5a7e8 100644 (file)
@@ -56,8 +56,7 @@ package net.systemeD.potlatch2.controller {
                                return d;
                        }
                        var cs:ControllerState = sharedMouseEvents(event, entity);
-                       if (cs) return cs;
-                       return this;
+                       return cs ? cs : this;
         }
 
                override public function processKeyboardEvent(event:KeyboardEvent):ControllerState {
@@ -67,7 +66,8 @@ package net.systemeD.potlatch2.controller {
                                case Keyboard.BACKSPACE:        return deleteNode();
                                case Keyboard.DELETE:           return deleteNode();
                        }
-                       return this;
+                       var cs:ControllerState = sharedKeyboardEvents(event);
+                       return cs ? cs : this;
                }
                
                override public function enterState():void {