Merge remote branch 'gravitystorm/relationmembers'
authorRichard Fairhurst <richard@systemeD.net>
Fri, 27 May 2011 11:25:45 +0000 (12:25 +0100)
committerRichard Fairhurst <richard@systemeD.net>
Fri, 27 May 2011 11:25:45 +0000 (12:25 +0100)
net/systemeD/potlatch2/mapfeatures/editors/RouteIcon.mxml
net/systemeD/potlatch2/mapfeatures/editors/TurnRestrictionIcon.mxml

index 6eca2c7f760353ff4ea2a25bc79da970000f80d2..7ab0003d6388c279d5d4aab1d903a0e5d19ddde3 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>
index 943a41c9c6080738697a9f9bf2e44e4c586c5ad1..40259a2671d9bc2663eba3b561526ff00b2d1014 100644 (file)
                // now add new entity
                rel.appendMember(new RelationMember(entity,role), undo.push);
 
-        undo.doAction();
+        MainUndoStack.getGlobalStack().addAction(undo);
 
                if (show.label=='Hide') { setHighlights(true); }
        }