Modify

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#13414 closed defect (fixed)

[Patch] Allow non-default file formats with native file chooser

Reported by: simon04 Owned by: team
Priority: normal Milestone: 16.10
Component: Core Version:
Keywords: Cc: Don-vip

Description

The native file chooser has been added in #10024.

Since NativeFileChooser#getChoosableFileFilters always returns an empty array, in saving does not permit non-default file formats.

To reproduce:

  1. Enable native file chooser
  2. New data layer, draw some lines
  3. Save as
  4. Input foobar.gpx
  5. File is saved as foobar.gpx.osm in OSM format
Build-Date:2016-08-18 18:38:37
Revision:10840
Is-Local-Build:true

Identification: JOSM/1.5 (10840 SVN en) Linux Arch Linux
Memory Usage: 589 MB / 3504 MB (194 MB allocated, but free)
Java version: 1.8.0_102-b14, Oracle Corporation, OpenJDK 64-Bit Server VM
VM arguments: [-agentlib:jdwp=transport=dt_socket,address=127.0.0.1:41665,suspend=y,server=n, -Djosm.home=<josm.pref>, -javaagent:/usr/share/intellijidea-ce/plugins/Groovy/lib/agent/gragent.jar, -Dfile.encoding=UTF-8]
Program arguments: [--set=use.native.file.dialog=true, --set=expert=true, --set=remotecontrol.enabled=true, --set=debug.edt-checker.enable=true, --set=dialog.dynamic.buttons=false, --set=iso.dates=true]
Dataset consistency test: No problems found

Attachments (1)

13414.patch (1.6 KB) - added by simon04 3 years ago.

Download all attachments as: .zip

Change History (6)

Changed 3 years ago by simon04

Attachment: 13414.patch added

comment:1 Changed 3 years ago by Don-vip

If I remember correctly it did not work at all because of a lot of Java bugs (those in comments). Have they been solved since?

comment:2 Changed 3 years ago by Don-vip

JDK bugs are still there but I confirm your patch works as expected on Windows too.

comment:3 Changed 3 years ago by Don-vip

Milestone: 16.0816.09

comment:4 Changed 3 years ago by simon04

Resolution: fixed
Status: newclosed

In 11004/josm:

fix #13414 - Allow non-default file formats with native file chooser

comment:5 Changed 3 years ago by simon04

Milestone: 16.0916.10

Milestone renamed

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.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.