Fix setting a route relation role (forward/backward) via the simple interface - was...
authorAndy Allan <andy@gravitystorm.co.uk>
Fri, 27 May 2011 10:19:29 +0000 (11:19 +0100)
committerAndy Allan <andy@gravitystorm.co.uk>
Fri, 27 May 2011 10:19:29 +0000 (11:19 +0100)
Also cast the relation so that in future this would be a compile-time error.

net/systemeD/potlatch2/mapfeatures/editors/RouteIcon.mxml

index 6eca2c7..7ab0003 100644 (file)
     
     private function setRole(role:String):void {
         var member:RelationMember = new RelationMember(_route["entity"], role);
-        _route["relation"].setMember(_route["index"], member);
+        Relation(_route["relation"]).setMember(_route["index"], member, MainUndoStack.getGlobalStack().addAction);
     }
 
        private function removeFromRelation():void {
-               _route["relation"].removeMember(_route["entity"], MainUndoStack.getGlobalStack().addAction);
+               Relation(_route["relation"]).removeMember(_route["entity"], MainUndoStack.getGlobalStack().addAction);
        }
     
     ]]></mx:Script>