alt-click (for now) to bring ways in from vector background layers
[potlatch2.git] / net / systemeD / potlatch2 / controller / ControllerState.as
index f1a367178d00113c49e808686ac008a9f6ee383f..864237719872e1a181c3778aa13941232a170cc3 100644 (file)
@@ -1,6 +1,8 @@
 package net.systemeD.potlatch2.controller {
        import flash.events.*;
+       import flash.display.*;
     import net.systemeD.halcyon.Map;
+    import net.systemeD.halcyon.MapPaint;
     import net.systemeD.halcyon.connection.*;
     import net.systemeD.potlatch2.EditController;
        import net.systemeD.halcyon.Globals;
@@ -39,6 +41,14 @@ package net.systemeD.potlatch2.controller {
                public function toString():String {
                        return "(No state)";
                }
+               
+               protected function getMapPaint(d:DisplayObject):MapPaint {
+                       while (d) {
+                               if (d is MapPaint) { return MapPaint(d); }
+                               d=d.parent;
+                       }
+                       return null;
+               }
 
     }
 }