Changeset 9466 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2016-01-15T16:00:22+01:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/actions
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java
r9371 r9466 227 227 return exporter.filter; 228 228 } 229 // if extension did not match defaultExtension of any exporter, 230 // scan all supported extensions 231 File file = new File("file." + extension); 232 for (FileExporter exporter : exporters) { 233 if (exporter.filter.accept(file)) 234 return exporter.filter; 235 } 229 236 return new AllFormatsImporter().filter; 230 237 } … … 242 249 public static void applyChoosableImportFileFilters(AbstractFileChooser fileChooser, String extension, boolean allTypes) { 243 250 for (ExtensionFileFilter filter: getImportExtensionFileFilters()) { 251 244 252 if (allTypes || filter.acceptName("file."+extension)) { 245 253 fileChooser.addChoosableFileFilter(filter); -
trunk/src/org/openstreetmap/josm/actions/SaveActionBase.java
r9413 r9466 169 169 // No filefilter accepts current filename, add default extension 170 170 String fn = file.getPath(); 171 if (ff instanceof ExtensionFileFilter) { 171 if (extension != null) { 172 fn += '.' + extension; 173 } else if (ff instanceof ExtensionFileFilter) { 172 174 fn += '.' + ((ExtensionFileFilter) ff).getDefaultExtension(); 173 } else if (extension != null) {174 fn += '.' + extension;175 175 } 176 176 file = new File(fn);
Note:
See TracChangeset
for help on using the changeset viewer.