do the 'Add to route' button in the route editor
[potlatch2.git] / net / systemeD / potlatch2 / mapfeatures / editors / RouteEditor.mxml
index 33e308b0280835ec7a40626ba503773caef1453e..6ab87fc3447132413c89f4fa9413bac952e7918b 100644 (file)
@@ -10,7 +10,7 @@
 
   <mx:Label text="{fieldName}:"/>
   <mx:VBox verticalGap="0" width="100%" id="routeIcons"/>
-  <mx:LinkButton label="Add to route"/>
+  <mx:LinkButton label="Add to route" click="addToRelation()" />
 
   <mx:Script><![CDATA[
     import net.systemeD.halcyon.connection.*;
         panel.setRelation(relation["relation"]);
         PopUpManager.centerPopUp(panel);
     }
+
+      public function addToRelation():void {
+          new RelationSelectPanel().init(_entity, _factory.relationTags);        
+      }
+      
     
   ]]></mx:Script>
 </edit:RelationMemberEditor>