Changeset 1978 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2009-08-13T20:36:35+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/DiskAccessAction.java
r1949 r1978 5 5 6 6 import java.io.File; 7 7 8 import javax.swing.JFileChooser; 9 import javax.swing.filechooser.FileFilter; 10 8 11 import org.openstreetmap.josm.Main; 9 12 import org.openstreetmap.josm.gui.ExtendedDialog; 13 import org.openstreetmap.josm.io.FileImporter; 10 14 import org.openstreetmap.josm.tools.Shortcut; 11 import org.openstreetmap.josm.io.FileImporter;12 15 13 16 /** … … 31 34 32 35 fc.setMultiSelectionEnabled(multiple); 36 fc.setAcceptAllFileFilterUsed(false); 37 FileFilter defaultFilter = null; 33 38 for (FileImporter imExporter: ExtensionFileFilter.importers) { 34 39 fc.addChoosableFileFilter(imExporter.filter); 40 if (imExporter.filter.defaultExtension.endsWith("osm")) { 41 defaultFilter = imExporter.filter; 42 } 43 35 44 } 36 45 37 fc.setAcceptAllFileFilterUsed(true); 46 if (defaultFilter != null) { 47 fc.setFileFilter(defaultFilter); 48 } 49 38 50 39 51 int answer = open ? fc.showOpenDialog(Main.parent) : fc.showSaveDialog(Main.parent);
Note:
See TracChangeset
for help on using the changeset viewer.