Ignore:
Timestamp:
2017-09-13T16:30:27+02:00 (7 years ago)
Author:
bastiK
Message:

see #15229 - fix deprecations caused by [12840]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/preferences/projection/ProjectionPreference.java

    r12786 r12841  
    2828import org.openstreetmap.josm.data.coor.conversion.CoordinateFormatManager;
    2929import org.openstreetmap.josm.data.coor.conversion.ICoordinateFormat;
    30 import org.openstreetmap.josm.data.preferences.CollectionProperty;
     30import org.openstreetmap.josm.data.preferences.ListProperty;
    3131import org.openstreetmap.josm.data.preferences.StringProperty;
    3232import org.openstreetmap.josm.data.projection.CustomProjection;
     
    291291    private static final StringProperty PROP_PROJECTION_DEFAULT = new StringProperty("projection.default", mercator.getId());
    292292    private static final StringProperty PROP_COORDINATES = new StringProperty("coordinates", null);
    293     private static final CollectionProperty PROP_SUB_PROJECTION_DEFAULT = new CollectionProperty("projection.default.sub", null);
     293    private static final ListProperty PROP_SUB_PROJECTION_DEFAULT = new ListProperty("projection.default.sub", null);
    294294    private static final String[] unitsValues = ALL_SYSTEMS.keySet().toArray(new String[ALL_SYSTEMS.size()]);
    295295    private static final String[] unitsValuesTr = new String[unitsValues.length];
     
    482482        }
    483483        id = pc.getId();
    484         Main.pref.putCollection("projection.sub."+id, pref);
     484        Main.pref.putList("projection.sub."+id, pref == null ? null : new ArrayList<>(pref));
    485485        if (makeDefault) {
    486486            PROP_PROJECTION_DEFAULT.put(id);
    487             PROP_SUB_PROJECTION_DEFAULT.put(pref);
     487            PROP_SUB_PROJECTION_DEFAULT.put(pref == null ? null : new ArrayList<>(pref));
    488488        } else {
    489489            projectionChoice = id;
     
    560560     */
    561561    public static Collection<String> getSubprojectionPreference(String pcId) {
    562         return Main.pref.getCollection("projection.sub."+pcId, null);
     562        return Main.pref.getList("projection.sub."+pcId, null);
    563563    }
    564564
Note: See TracChangeset for help on using the changeset viewer.