Ignore:
Timestamp:
2008-07-02T23:58:49+02:00 (16 years ago)
Author:
frederik
Message:

JOSM WMS plugin patches by Bodo Meissner <bodo@…> to fix preferences bug

Location:
applications/editors/josm/plugins/wmsplugin/src/wmsplugin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSPlugin.java

    r6780 r8664  
    3434
    3535        static ArrayList<WMSInfo> wmsList = new ArrayList<WMSInfo>();
     36
     37       // remember state of menu item to restore on changed preferences
     38       static private boolean menuEnabled = false;
    3639       
    3740        public WMSPlugin() {
     
    118121                wmsJMenu.addSeparator();
    119122                wmsJMenu.add(new JMenuItem(new Help_WMSmenuAction()));
    120                 setEnabledAll(false);
     123               setEnabledAll(menuEnabled);
    121124        }
    122125
     
    135138                        if(item != null) item.setEnabled(isEnabled);
    136139                }
     140               menuEnabled = isEnabled;
    137141        }
    138142       
  • applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSPreferenceEditor.java

    r6775 r8664  
    111111                }
    112112               
    113                 // josm doesn't seem to give us an option to delete preferences,
    114                 // we can only overwrite them with empty strings...
     113               // using null values instead of empty string really deletes
     114               // the preferences entry
    115115                for (WMSInfo i : oldValues.values()) {
    116                         i.url = "";
    117                         i.name = "";
     116                       i.url = null;
     117                       i.name = null;
    118118                        i.save();
    119119                        change = true;
Note: See TracChangeset for help on using the changeset viewer.