Changeset 9721 in josm for trunk/src/org


Ignore:
Timestamp:
2016-02-03T15:03:32+01:00 (9 years ago)
Author:
bastiK
Message:

applied #12369 - default extension for saving files read from preferences: fixes (patch by kolesar)

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/SaveActionBase.java

    r9702 r9721  
    198198            // No filefilter accepts current filename, add default extension
    199199            String fn = file.getPath();
    200             if (extension != null) {
     200            if (extension != null && ff.accept(new File(fn + '.' + extension))) {
    201201                fn += '.' + extension;
    202202            } else if (ff instanceof ExtensionFileFilter) {
  • trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java

    r9714 r9721  
    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;
     
    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 */
     
    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()) {
Note: See TracChangeset for help on using the changeset viewer.