Changeset 9674 in josm for trunk/src/org/openstreetmap/josm/gui/widgets
- Timestamp:
- 2016-01-29T21:47:58+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/widgets/FileChooserManager.java
r9670 r9674 284 284 */ 285 285 public FileChooserManager doCreateFileChooser() { 286 File f ile= new File(curDir);286 File f = new File(curDir); 287 287 // Use native dialog is preference is set, unless an unsupported selection mode is specifically wanted 288 288 if (PROP_USE_NATIVE_FILE_DIALOG.get() && NativeFileChooser.supportsSelectionMode(selectionMode)) { 289 fc = new NativeFileChooser(f ile);289 fc = new NativeFileChooser(f); 290 290 } else { 291 fc = new SwingFileChooser(f ile);291 fc = new SwingFileChooser(f); 292 292 } 293 293 … … 332 332 */ 333 333 public AbstractFileChooser openFileChooser(Component parent) { 334 if (fc == null) doCreateFileChooser(); 334 if (fc == null) 335 doCreateFileChooser(); 335 336 336 337 if (parent == null) { … … 347 348 } 348 349 349 if (!open) { 350 File file = fc.getSelectedFile(); 351 if (!SaveActionBase.confirmOverwrite(file)) { 352 return null; 353 } 350 if (!open && !SaveActionBase.confirmOverwrite(fc.getSelectedFile())) { 351 return null; 354 352 } 355 353 return fc; … … 357 355 358 356 /** 359 * Opens the file chooser dialog, then checks if filename has the given extension. If not, adds the extension and asks for overwrite if filename exists. 357 * Opens the file chooser dialog, then checks if filename has the given extension. 358 * If not, adds the extension and asks for overwrite if filename exists. 360 359 * 361 360 * @return the {@code File} or {@code null} if the user cancelled the dialog.
Note:
See TracChangeset
for help on using the changeset viewer.