Changeset 6011 in josm for trunk/src/org
- Timestamp:
- 2013-06-16T14:27:13+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/SaveActionBase.java
r5460 r6011 147 147 if (fc == null) return null; 148 148 File file = fc.getSelectedFile(); 149 String fn = file.getPath(); 150 if (fn.indexOf('.') == -1) 151 { 152 FileFilter ff = fc.getFileFilter(); 149 150 FileFilter ff = fc.getFileFilter(); 151 if (!ff.accept(file)) { 152 // Extension of another filefilter given ? 153 for (FileFilter cff : fc.getChoosableFileFilters()) { 154 if (cff.accept(file)) { 155 fc.setFileFilter(cff); 156 return file; 157 } 158 } 159 // No filefilter accepts current filename, add default extension 160 String fn = file.getPath(); 153 161 if (ff instanceof ExtensionFileFilter) { 154 162 fn += "." + ((ExtensionFileFilter)ff).getDefaultExtension();
Note:
See TracChangeset
for help on using the changeset viewer.