Modify

Opened 8 years ago

Closed 8 years ago

#12392 closed enhancement (fixed)

[patch] default filename when saving layer

Reported by: kolesar Owned by: team
Priority: normal Milestone: 16.02
Component: Core Version:
Keywords: Cc:

Description (last modified by kolesar)

Use case: create a new data layer, rename it and save as a file. Current JOSM pops up save as dialog with empty filename. Patched version fills default filename with name of the layer if user has renamed that. If layer was not renamed and does not have an associated file (= is called Data layer n) then filename is empty. If layer has associated filename then it is displayed.

Requires patch #12391 that keeps track if layer was renamed by the user. Also requires #12394 that fixes NativeFileChooser.

Refactored telescopic contructors in FileChooserManager to builder pattern to be able to add new settings.

Attachments (2)

DefaultFilenameForRenamedLayer.patch (13.1 KB ) - added by kolesar 8 years ago.
DefaultFilenameForRenamedLayer.fix.patch​ (551 bytes ) - added by kolesar 8 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 by kolesar, 8 years ago

Description: modified (diff)

in reply to:  description comment:2 by bastiK, 8 years ago

Replying to kolesar:

Refactored telescopic contructors in FileChooserManager to builder pattern to be able to add new settings.

This is good, but please add javadoc for public methods.

comment:3 by kolesar, 8 years ago

Added javadoc for public methods.

comment:4 by bastiK, 8 years ago

Resolution: fixed
Status: newclosed

In 9670/josm:

applied #12392 - default filename when saving layer (patch by kolesar)

comment:5 by bastiK, 8 years ago

Milestone: 16.02

comment:6 by kolesar, 8 years ago

Resolution: fixed
Status: closedreopened

I have made a mistake in this patch. I have forgot to set allTypes parameter in FileChooserManager when saving OsmDatalayer. Only uncompressed .osm file format was selectable in non-native file chooser.

Attached fix.

comment:7 by bastiK, 8 years ago

Resolution: fixed
Status: reopenedclosed

In 9714/josm:

applied #12392 - default filename when saving layer: fix (patch by kolesar)

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.