Remove VectorLayer from EditController and fix up references in various sidebar panels
authorAndy Allan <andy@gravitystorm.co.uk>
Thu, 26 May 2011 13:13:34 +0000 (14:13 +0100)
committerAndy Allan <andy@gravitystorm.co.uk>
Thu, 26 May 2011 13:13:34 +0000 (14:13 +0100)
net/systemeD/potlatch2/EditController.as
net/systemeD/potlatch2/TagViewer.mxml
net/systemeD/potlatch2/controller/ControllerState.as
net/systemeD/potlatch2/controller/SelectedMarker.as
net/systemeD/potlatch2/panels/MarkerPanel.mxml

index 7cdbae2615b07b1f6f686b4977964d47fdfbb7b4..21b84b3be1dff56488f55015bf516281a876cbea 100644 (file)
@@ -1,9 +1,9 @@
 package net.systemeD.potlatch2 {
     import net.systemeD.halcyon.Map;
+    import net.systemeD.halcyon.MapPaint;
     import net.systemeD.halcyon.MapController;
     import net.systemeD.halcyon.MapEvent;
     import net.systemeD.halcyon.connection.*;
-    import net.systemeD.halcyon.VectorLayer;
     import net.systemeD.halcyon.Globals;
     import net.systemeD.potlatch2.controller.*;
     import net.systemeD.potlatch2.FunctionKeyManager;
@@ -78,7 +78,7 @@ package net.systemeD.potlatch2 {
         *
         * @param layer Optionally pass the layer of the currently selected entity, eg for BugLayers
         */
-               public function updateSelectionUI(layer:VectorLayer = null):void {
+               public function updateSelectionUI(layer:MapPaint = null):void {
                        tagViewer.setEntity(state.selection, layer);
                        toolbox.updateSelectionUI();
                }
index 915cebc7460c17a4cb2b643c8a892bd87f914813..5da5c22535b3a873c0f41c10f450d78be705a9f8 100644 (file)
 
   <mx:Script><![CDATA[
       import net.systemeD.halcyon.connection.*;
-      import net.systemeD.halcyon.VectorLayer;
+      import net.systemeD.halcyon.MapPaint;
       import net.systemeD.potlatch2.mapfeatures.*;
 
       import mx.collections.*;
 
       private var rowData:Object;              // relation membership reference, needed so it's accessible from relation actions menu
 
-         public function setEntity(entities:Array, layer:VectorLayer=null):void {
+         public function setEntity(entities:Array, layer:MapPaint=null):void {
                UIComponent.suspendBackgroundProcessing();
                connection=null;
 
index e442dba6e2bce196e15a4204d310c3cbc730c367..1e752f5b74f1491a3ecd7b014e9149cbfe4fc54b 100644 (file)
@@ -91,7 +91,7 @@ package net.systemeD.potlatch2.controller {
                                        if (entity is Way) { return new SelectedWay(newEntity as Way); }
                                        else if (entity is Node) { return new SelectedPOINode(newEntity as Node); }
                 } else if (event.type == MouseEvent.MOUSE_DOWN && entity is Marker) {
-                    return new SelectedMarker(entity as Marker, paint.findSource());
+                    return new SelectedMarker(entity as Marker, paint);
                                } else if ( event.type == MouseEvent.MOUSE_UP ) {
                                        return (this is NoSelection) ? null : new NoSelection();
                                } else { return null; }
index 34e46e3063dd2e444b7e1d1a60c9b138f3ccd277..9f9aeca8e92559845011629c474bc8c4588b0ea3 100644 (file)
@@ -3,13 +3,13 @@ package net.systemeD.potlatch2.controller {
        import flash.ui.Keyboard;
     import net.systemeD.potlatch2.EditController;
     import net.systemeD.halcyon.connection.*;
-    import net.systemeD.halcyon.VectorLayer;
+    import net.systemeD.halcyon.MapPaint;
 
     public class SelectedMarker extends ControllerState {
         protected var initMarker:Marker;
-        protected var layer:VectorLayer;
+        protected var layer:MapPaint;
 
-        public function SelectedMarker(marker:Marker, layer:VectorLayer) {
+        public function SelectedMarker(marker:Marker, layer:MapPaint) {
             initMarker = marker;
             this.layer = layer;
         }
index 0aef7b324b0f27e891ba7c43093da5c0da453d50..2ab42b3d5d7624414d56bf135e4a1ad390f56995 100644 (file)
   <mx:Script><![CDATA[
 
       import net.systemeD.halcyon.connection.*;
-      import net.systemeD.halcyon.VectorLayer;
+      import net.systemeD.halcyon.MapPaint;
       import mx.collections.*;
 
       private var selectedEntity:Entity;
       private var tagDataProvider:ArrayCollection;
-      private var layer:VectorLayer;
+      private var layer:MapPaint;
 
-      public function init(entity:Entity, layer:VectorLayer):void {
+      public function init(entity:Entity, layer:MapPaint):void {
             this.layer = layer;
             if ( tagDataProvider == null ) {
                 tagDataProvider = new ArrayCollection();