Don't die if user undoes way creation while in DrawWay.
authorRichard Fairhurst <richard@systemeD.net>
Fri, 17 Jun 2011 16:18:37 +0000 (17:18 +0100)
committerRichard Fairhurst <richard@systemeD.net>
Fri, 17 Jun 2011 16:18:37 +0000 (17:18 +0100)
net/systemeD/potlatch2/controller/DrawWay.as

index 1984ecef58cc7d3dd0b98a00356d2b86b48e312c..f8811f9db1ef51b8eda0dcb723ccd2be6d06350a 100644 (file)
@@ -31,6 +31,8 @@ package net.systemeD.potlatch2.controller {
                }
                
                override public function processMouseEvent(event:MouseEvent, entity:Entity):ControllerState {
+                       if (firstSelected.deleted) return new NoSelection();    // in case user has clicked Undo
+
                        var mouse:Point;
                        var node:Node;
                        var paint:MapPaint = getMapPaint(DisplayObject(event.target));