- Timestamp:
- 2010-09-30T19:49:36+02:00 (14 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/actions
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/GpxExportAction.java
r2842 r3570 73 73 throw new IllegalArgumentException(MessageFormat.format("Expected instance of OsmDataLayer or GpxLayer. Got ''{0}''.", layer.getClass().getName())); 74 74 75 File file = createAndOpenSaveFileChooser(tr("Export GPX file"), " .gpx");75 File file = createAndOpenSaveFileChooser(tr("Export GPX file"), "gpx"); 76 76 if (file == null) 77 77 return; -
trunk/src/org/openstreetmap/josm/actions/SaveActionBase.java
r3336 r3570 188 188 189 189 File file = fc.getSelectedFile(); 190 if(extension != null){ 191 String fn = file.getPath(); 192 if(fn.indexOf('.') == -1) 193 { 194 FileFilter ff = fc.getFileFilter(); 195 if (ff instanceof ExtensionFileFilter) { 196 fn += "." + ((ExtensionFileFilter)ff).getDefaultExtension(); 197 } else { 198 fn += extension; 199 } 200 file = new File(fn); 201 } 190 String fn = file.getPath(); 191 if(fn.indexOf('.') == -1) 192 { 193 FileFilter ff = fc.getFileFilter(); 194 if (ff instanceof ExtensionFileFilter) { 195 fn += "." + ((ExtensionFileFilter)ff).getDefaultExtension(); 196 } else if(extension != null) { 197 fn += "." + extension; 198 } 199 file = new File(fn); 202 200 } 203 201 if(file == null || (file.exists())) {
Note:
See TracChangeset
for help on using the changeset viewer.