keyboard shortcut for Undo, plus gratuitous use of ternary operator
[potlatch2.git] / net / systemeD / potlatch2 / controller / DrawWay.as
index 1772146b76312ce58b2d0c43be36844858729dda..af1cdeb0a2dea8379be6370290e60ea2821ad343 100644 (file)
@@ -96,7 +96,8 @@ package net.systemeD.potlatch2.controller {
                override public function processKeyboardEvent(event:KeyboardEvent):ControllerState {
                        if ( event.keyCode == 13 || event.keyCode == 27 ) { return stopDrawing(); }
                        else if (event.keyCode == Keyboard.BACKSPACE) { return backspaceNode(MainUndoStack.getGlobalStack().addAction); }
-                       return this;
+                       var cs:ControllerState = sharedKeyboardEvents(event);
+                       return cs ? cs : this;
                }
                
                protected function stopDrawing():ControllerState {