Ticket #12369: SaveExtensionOsmPreferences.patch

File SaveExtensionOsmPreferences.patch, 1.9 KB (added by kolesar, 6 years ago)
  • src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java

    diff --git a/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java b/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
    index 3ea58fc..3dd7dcf 100644
    a b import org.openstreetmap.josm.data.osm.visitor.paint.MapRendererFactory; 
    7575import org.openstreetmap.josm.data.osm.visitor.paint.Rendering;
    7676import org.openstreetmap.josm.data.osm.visitor.paint.relations.MultipolygonCache;
    7777import org.openstreetmap.josm.data.preferences.IntegerProperty;
     78import org.openstreetmap.josm.data.preferences.StringProperty;
    7879import org.openstreetmap.josm.data.projection.Projection;
    7980import org.openstreetmap.josm.data.validation.TestError;
    8081import org.openstreetmap.josm.gui.ExtendedDialog;
    public class OsmDataLayer extends AbstractModifiableLayer implements Listener, S 
    127128    public static final int DEFAULT_RECENT_RELATIONS_NUMBER = 20;
    128129    public static final IntegerProperty PROPERTY_RECENT_RELATIONS_NUMBER = new IntegerProperty("properties.last-closed-relations-size",
    129130            DEFAULT_RECENT_RELATIONS_NUMBER);
     131    public static final StringProperty PROPERTY_SAVE_EXTENSION = new StringProperty("save.extension.osm", "osm");
     132
    130133
    131134    /** List of recent relations */
    132135    private final Map<Relation, Void> recentRelations = new LinkedHashMap<Relation, Void>(PROPERTY_RECENT_RELATIONS_NUMBER.get()+1, 1.1f, true) {
    public class OsmDataLayer extends AbstractModifiableLayer implements Listener, S 
    10061009
    10071010    @Override
    10081011    public File createAndOpenSaveFileChooser() {
    1009         String extension = Main.pref.get("save.extension.osm", "osm");
     1012        String extension = PROPERTY_SAVE_EXTENSION.get();
    10101013        File file = getAssociatedFile();
    10111014        if (file == null && isRenamed()) {
    10121015            String filename = Main.pref.get("lastDirectory") + '/' + getName();