Modify

Opened 14 years ago

Closed 13 years ago

#6733 closed defect (fixed)

[patch] File Open dialog incorrectly accepts folder selection

Reported by: Don-vip Owned by: team
Priority: trivial Milestone:
Component: Core Version: latest
Keywords: JFileChooser Cc:

Description (last modified by richlv)

The JOSM "File, Open" dialog accepts a folder as selected object(s) whereas only files are processed.
This prevents for example to paste a folder path in its file name text area in order to quickly display a folder's contents before selecting a specific file. Instead, the folder is selected by the JFileChooser and JOSM tries to read the folder contents.

Please find attached the patch.

Attachments (1)

patch.diff (657 bytes ) - added by Don-vip 14 years ago.

Download all attachments as: .zip

Change History (9)

by Don-vip, 14 years ago

Attachment: patch.diff added

comment:1 by stoecker, 14 years ago

Resolution: wontfix
Status: newclosed

The JOSM open file dialog accepts directories, as when a directory is selected it loads all images from it. This patch would destroy that feature.

comment:2 by bastiK, 14 years ago

It should probably also open all other files it finds in the folder, but this is a different issue.

comment:3 by stoecker, 14 years ago

I thought so also before, but whereas a lot of images is normal, e.g. loading a lot off GPX files surely kills josm, so I think current method is better :-)

comment:4 by Don-vip, 14 years ago

Could it be at least an internal property ? I don't care about this images autoloading, I personally select them all when I want to load all of them... But I definitely want to paste a folder's path in the text input field in order to display its contents without having to reach it by clicking all the way through the explorer :( It's really a non conventional usage to allow folder selection when you want to open files, I find this behaviour very disturbing.

comment:5 by richlv, 13 years ago

Description: modified (diff)
Resolution: wontfix
Status: closedreopened

reopening so this is not forgotten :)

if the entered text in the address/location field is a directory, josm should first display it's contents.

ability to open all files in a directory should be provided by selecting that directory in the file listing, then specifically 'opening' it.

reasoning :

  1. all other software does it that way :)
  2. usecase : i have directory where i store gps traces and images. so occasionally i want to quickly get to that location to open one gps trace. i enter the path, hit 'enter'... and josm tries to open some 20gb of images.

comment:6 by AlfonZ, 13 years ago

I found that using Ctrl+Enter instead of Enter does the trick (opening pasted folder for further selection, versus accepting that folder and searching for images within it).
I'm not sure if this works on all platforms though.

Identification: JOSM/1.5 (5405 SVN en)
Java version: 1.7.0_05, Oracle Corporation, Java HotSpot(TM) Client VM
Operating system: Windows XP

comment:7 by bastiK, 13 years ago

When integrating the AgPifoJ, I wasn't too comfortable with this either. I thought, that some people might have problems with double click and select a folder and click "open" as a workaround. This wouldn't work of course. But since there were no complaints for months, I left it this way.

However, in addition to the usability problems described by Don-vip, I noticed, that many people don't know the photo-mapping feature in JOSM. Or they have heard of it, but they have no idea how to actually load their photos into JOSM.

So my suggestion:

  • Apply the patch
  • Add an additional menu entry File > Import Photos..., that is the same as File > Open..., but restricted to images, and with the current recursive folder opening feature.

comment:8 by Don-vip, 13 years ago

Resolution: fixed
Status: reopenedclosed

In 5438/josm:

fix #6733 - File Open dialog incorrectly accepts folder selection

Major rework of how the JFileChooser are created in JOSM

  • Simple need: use DiskAccessAction.createAndOpenFileChooser methods
  • Complex need: use directly the new class JFileChooserManager

Concerning the directory selection for geottaged images, this is still possible via:

  • right-click on GPX layer -> Import Photos

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.