Select new POIs when they are dropped on the map.
[potlatch2.git] / potlatch2.mxml
index 0ed126352b574ea8fb59740d0abbe2b3ca4f9b6b..5a6cdbd9ef910e20b95f7efe690b1a911f44b1ed 100755 (executable)
@@ -57,6 +57,7 @@
                import net.systemeD.halcyon.connection.*;
                import net.systemeD.potlatch2.*;
                import net.systemeD.potlatch2.save.SaveManager;
+               import net.systemeD.potlatch2.controller.*;
                import net.systemeD.potlatch2.help.*;
                import net.systemeD.potlatch2.options.*;
                import net.systemeD.potlatch2.utils.*;
@@ -76,6 +77,7 @@
         import mx.core.DragSource;
 
         public var theMap:Map;
+        public var theController:EditController;
                public var yahooListener:Object = new Object();
                public var yahoo:YahooMap = new YahooMap(); 
 
             t.visible = loaderInfo.parameters["show_debug"] == 'true';
                        Globals.vars.root=theMap;       // just for the addDebug function
 
-            var controller:EditController = new EditController(theMap, tagViewer);
-            controller.setActive();
+            theController = new EditController(theMap, tagViewer);
+            theController.setActive();
             
             var conn:Connection = Connection.getConnectionInstance();
             conn.addEventListener(Connection.LOAD_STARTED, onDataStart);
               node.setTag(tag.k, tag.v);
             }
                        Connection.getConnectionInstance().registerPOI(node);
+            theController.setState(new SelectedPOINode(node));
         }
 
        ]]></mx:Script>