Modify

Opened 4 years ago

Closed 4 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 4 years ago.
DefaultFilenameForRenamedLayer.fix.patch​ (551 bytes) - added by kolesar 4 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 4 years ago by kolesar

Description: modified (diff)

comment:2 in reply to:  description Changed 4 years ago by bastiK

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 Changed 4 years ago by kolesar

Added javadoc for public methods.

Changed 4 years ago by kolesar

comment:4 Changed 4 years ago by bastiK

Resolution: fixed
Status: newclosed

In 9670/josm:

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

comment:5 Changed 4 years ago by bastiK

Milestone: 16.02

comment:6 Changed 4 years ago by kolesar

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.

Changed 4 years ago by kolesar

comment:7 Changed 4 years ago by bastiK

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.

Add Comment


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

 
Note: See TracTickets for help on using tickets.