#15704 closed enhancement (fixed)
[PATCH] Keep order of tags added by 'addtags=' query parameter
Reported by: | skorbut | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 17.12 |
Component: | Core remotecontrol | Version: | |
Keywords: | Cc: |
Description
If one adds tags using the query parameter addtags=
, they inherently have an order. This order might be or might not be relevant to the user of JOSM. When the "Add tags to selected objects" dialog is used, the order of the tags gets lost due to the usage of the type HashSet<>
in the class AddTagsDialog
. (This is not only a theoretical issue, tags get indeed reordered seemingly randomly.)
This simple patch keeps the order of the tags by using the type LinkedHashSet<>
instead. Therefore the creator of the remotecontrol URL can control, in which order tags are shown to the JOSM user.
Why is this useful? Given a site such as http://demo.tlab.ch/tomas-gr , tags might be shown to the JOSM user a second time, independently of JOSM. By keeping the tag order, it is easier for the user to compare the two lists of tags. [*] If instead the order of tags doesn't matter to the user, this patch doesn't make things worse.
Why not sort them alphabetically? We don't know if this is what the user wants/expects. The tags might be sorted by some definition of importance. However, I plan to create and submit another patch, which lets the user sort the list of tags in the dialog by "Key", "Value" and "Existing values".
[*] Note that the order of tags shown at http://demo.tlab.ch/tomas-gr is currently not the same as the order of tags placed into the remotecontrol URL.
Attachments (1)
Change History (4)
by , 7 years ago
Attachment: | keep_order.patch added |
---|
comment:1 by , 7 years ago
Milestone: | → 17.12 |
---|
comment:2 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 by , 7 years ago
The aforementioned patch for sorting the dialog's columns can be found at https://josm.openstreetmap.de/ticket/15705 .
In 13258/josm: