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 c2a47bb6fb3ff6a34c57758ea56eede6ae242660..9c2e6d8aebb60670cdd945327a2827ace8f0b432 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 d0674c453571889821061dc499c28446a058d1b1..4c5518f4dce3233cfd1030654bfacb1432c9b7e4 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 9a1d391813ab6295d41c51c72d075dc58f4a6969..5917760098f3aabab0cb687352b72ac57f82e211 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 {