fix tab selection issue, and remove annoying flash of drag-and-drop panel when going...
[potlatch2.git] / net / systemeD / potlatch2 / EditController.as
index 3ac6bd6..099697c 100644 (file)
@@ -3,6 +3,7 @@ package net.systemeD.potlatch2 {
     import net.systemeD.halcyon.MapController;
     import net.systemeD.halcyon.connection.*;
     import net.systemeD.potlatch2.controller.*;
+       import mx.managers.CursorManager;
        import flash.events.*;
        import flash.geom.*;
 
@@ -16,7 +17,15 @@ package net.systemeD.potlatch2 {
         private var _connection:Connection;
         
                private var keys:Object={};
+               public var clipboards:Object={};
+               public var imagery:Array=[];
 
+               [Embed(source="../../../embedded/pen.png")]             public var pen:Class;
+               [Embed(source="../../../embedded/pen_x.png")]           public var pen_x:Class;
+               [Embed(source="../../../embedded/pen_o.png")]           public var pen_o:Class;
+               [Embed(source="../../../embedded/pen_so.png")]          public var pen_so:Class;
+               [Embed(source="../../../embedded/pen_plus.png")]        public var pen_plus:Class;
+               
         public function EditController(map:Map, tagViewer:TagViewer, toolbox:Toolbox) {
             this._map = map;
             this.tagViewer = tagViewer;
@@ -94,13 +103,18 @@ package net.systemeD.potlatch2 {
                 return;
                 
             if ( state != null )
-                state.exitState();
+                state.exitState(newState);
             newState.setController(this);
             newState.setPreviousState(state);
             state = newState;
             state.enterState();
         }
 
+               public function setCursor(cursor:Class):void {
+                       CursorManager.removeAllCursors();
+                       if (cursor) { CursorManager.setCursor(cursor,2,-4,0); }
+               }
+
     }