Opened 16 years ago

Last modified 12 years ago

#4644 closed enhancement

[patch] copy primitive id to clipboard — at Version 5

Reported by: vsandre Owned by: team
Priority: normal Milestone:
Component: Core Version: latest
Keywords: clipboard id Cc:

Description (last modified by skyper)

Please introduce a possibility to copy the primitive id to the clipboard.

style:
relation/12345 or way/123456 or node/1234567

How?
right click in the selection sidebar and "copy id"

Change History (6)

comment:1 by anonymous, 16 years ago

Do you know about ctrl-c ?

However it does not add the type of the object, only the id.

comment:2 by vsandre, 16 years ago

Nice, since which version?

So please add a preference entry to switch between the mentioned way and the existing methode.

comment:3 by simon04, 14 years ago

In r4347, when copying elements of different types (e.g., a node and a way), the clipboard contains a comma separated list of ids, but missing the type of the elements. As this is quite useless, one should think of generally adapting this behaviour.

by xeen, 12 years ago

Attachment: 4644_v1.patch added

comment:4 by xeen, 12 years ago

Copying relations works even without this patch and yields something like this (select relation in sidebar dialog, press ctrl+c):

{Relation id=1639515 version=1 VT [way 119206655, way 119206654]}

The attached patch generates the clip board content similar to:

node 1089302677,node 1089303458,way 93793372

It would also be possible to use the line commented out in the patch, which yields "closedway" instead of just "way" when a way is closed. Theoretically it could also emit multipolygon, but selection since each way is selected individually, this is not the case.

I’m unsure which to choose, although I’m leaning against the "closedway" option. Relation copy output works that way and closedway is only used internally in JOSM and is not present in OSM. If there are no objections, I will merge the patch (without the commented out line) once I remember to do so.

comment:5 by skyper, 12 years ago

Description: modified (diff)
Summary: copy primitive id to clipboard[patch] copy primitive id to clipboard
Note: See TracTickets for help on using tickets.