Save status of tiger toggle and use it when launching
authorAndy Allan <gravitystorm@gmail.com>
Wed, 27 Oct 2010 14:30:03 +0000 (14:30 +0000)
committerAndy Allan <gravitystorm@gmail.com>
Wed, 27 Oct 2010 14:30:03 +0000 (14:30 +0000)
TODO.txt
net/systemeD/potlatch2/options/OptionsDialog.mxml
potlatch2.mxml

index c2a47bb..9c2e6d8 100644 (file)
--- a/TODO.txt
+++ b/TODO.txt
@@ -39,7 +39,6 @@ Potlatch 2: main outstanding issues
 * Ctrl-clicking two areas (one inside the other) should create a multipolygon
 * B keypress for background source tag
 * Multiple selection
-* Options should be remembered via SharedObjects
 * small node hitzone when creating areas - hitzone and mouseover UI don't match up
 * GPS loading should have a loading... label
 * Pressing undo/redo sometimes doesn't change controllerstate. (e.g. create POI + undo leaves the tag panel still referring to POI)
index d0674c4..4c5518f 100644 (file)
         PopUpManager.addPopUp(this, Application(Application.application), true);
         PopUpManager.centerPopUp(this);
         this.addEventListener(CloseEvent.CLOSE, optionsDialog_close);
-               tbcheck.selected=Application.application.toolbox.visible;
-               cursorcheck.selected=Application.application.theController.cursorsEnabled;
+
+        var obj:SharedObject = SharedObject.getLocal("user_state");
+
+        tbcheck.selected = Application.application.toolbox.visible;
+        cursorcheck.selected = Application.application.theController.cursorsEnabled;
+        tigercheck.selected = obj.data['tiger_highlighted'];
     }
     
     private function optionsDialog_close(evt:CloseEvent):void {
     private function tigerToggle():void {
         Globals.vars.highlightTiger = tigercheck.selected;
         Application.application.theMap.redraw();
+
+        var obj:SharedObject = SharedObject.getLocal("user_state");
+        obj.setProperty("tiger_highlighted",tigercheck.selected);
+        obj.flush();
     }
 
               ]]>
index 9a1d391..5917760 100755 (executable)
             if (show_help == 'always' || (show_help == 'once' && obj.data["help_shown"] != "true")) {
               new HelpDialog().init();
             }
+
+            // Check if Tiger highlighting should be enabled from saved object
+            Globals.vars.highlightTiger = obj.data['tiger_highlighted'];
                }
                
                public function onMapError(event:MapEvent):void {