Don't allow parallelise keypress to return 0-length ways
[potlatch2.git] / net / systemeD / potlatch2 / controller / SelectedParallelWay.as
index dc35494efe34314be9153a4fc27d1f71e07b24b5..8ff494c41c8364e7cae4befb5f8fa69d029ff375 100644 (file)
@@ -21,11 +21,12 @@ package net.systemeD.potlatch2.controller {
         }
 
         override public function processMouseEvent(event:MouseEvent, entity:Entity):ControllerState {
-                       if (event.type==MouseEvent.MOUSE_MOVE) {
+                       if (event.type==MouseEvent.MOUSE_MOVE || event.type==MouseEvent.MOUSE_UP) {
                                var lon:Number =controller.map.coord2lon(controller.map.mouseX);
                                var latp:Number=controller.map.coord2latp(controller.map.mouseY);
                                parallelise.draw(distanceFromWay(lon,latp));
-                       } else if (event.type==MouseEvent.MOUSE_UP) {
+                       }
+                       if (event.type==MouseEvent.MOUSE_UP) {
                                return new SelectedWay(firstSelected as Way);
                        }
                        return this;