#12357 closed enhancement (fixed)
[patch] copy tags shortcut
Reported by: | kolesar | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 16.02 |
Component: | Core shortcuts | Version: | latest |
Keywords: | copy tags | Cc: |
Description
Copying tags from the currently selected object(s) is very common in my workflow. First time I have tried simple Edit/Copy (Ctrl+C), result was:
way 283084976
Then I have found "Copy all Keys/Values" at properties dialog but many times I have selected a wrong menu item there. Finally I took to click into properties, Ctrl+A, Ctrl+C. This was better than right-click on a tag and find the appropriate menu item.
Today I have created a menu item for copying tags: Edit / Copy Tags (Ctrl+Shift+T).
I have moved existing logic of copying tags from PropertiesDialog to AbstractPrimitive. Appended keyboard shortcut to popup menu of PropertiesDialog. In the same menu there was a hardcoded shortcut (F1), modified to reflect customized keyboard shortcuts.
Attached patch.
Attachments (2)
Change History (23)
by , 9 years ago
Attachment: | CopyTagsAction.patch added |
---|
comment:1 by , 9 years ago
comment:2 by , 9 years ago
How's that different from PasteTags action where you copy the objects, but only paste the tags?
comment:3 by , 9 years ago
The idea of "Copy Tags" is to have the tags copied to the clipboard for use in other applications.
comment:4 by , 9 years ago
This is an utilsplugin change in this case. Should not be in the core (except for the cleanup parts).
comment:5 by , 9 years ago
Why do you relate this to utilsplugin? Core contains copy coordinates and paste tags. This action is closely related to them.
comment:6 by , 9 years ago
The amount of features in core should not be too much. That reduces usability and we already have so many functions in core. utilsplugin is the place for "nice to have" features which aren't important enough to fit into core.
follow-up: 9 comment:8 by , 9 years ago
Since we already have this feature in core (context menu in tags toggle dialog), I support this patch to bring it to a more prominent location in the edit menu.
We only have to find a shortcut ;).
comment:9 by , 9 years ago
Replying to simon04:
Since we already have this feature in core (context menu in tags toggle dialog), I support this patch to bring it to a more prominent location in the edit menu.
We only have to find a shortcut ;).
Thank you for support. Ctrl+Shift+T is free in ShortcutsList.
follow-up: 11 comment:10 by , 9 years ago
CMD+SHIFT+T
: Unfortunately not – it is used in the reverter plugin …
follow-up: 12 comment:11 by , 9 years ago
I'm slightly in favor of the patch.
Replying to simon04:
CMD+SHIFT+T
: Unfortunately not – it is used in the reverter plugin …
"Tool: Revert changeset" - Who needs a shortcut for that? We should assert some dominance and reclaim shortcuts from plugins. ;)
comment:12 by , 9 years ago
Replying to bastiK:
"Tool: Revert changeset" - Who needs a shortcut for that? We should assert some dominance and reclaim shortcuts from plugins. ;)
Sorry, I have searched only Ctrl+Shift+T there, not Cmd.
I have used revert changeset only once but I copy tags of objects many times per day. I think many people have similar use case. Key T is related closer to Tag than Revert.
comment:13 by , 9 years ago
I'm still against including that in core. If you use it that much or not does not count. Question is if others use it that much or not and most JOSM users probably do not copy information from or to other applications. So this option will further clutter the Edit menu without an advantage to the majority of our users. As we already have that feature in core the need is further reduced.
Move it to utilsplugin where it belongs.
follow-up: 15 comment:14 by , 9 years ago
What do you think about assigning a shortcut to existing action on properties dialog without an additional entry in Edit menu?
follow-up: 16 comment:15 by , 9 years ago
Replying to kolesar:
What do you think about assigning a shortcut to existing action on properties dialog without an additional entry in Edit menu?
Two sides:
a) Having shortcuts for core actions is in principle fine
b) Adding shortcuts for core actions further limits the chances of plugins which is not fine.
Adding an unassigned shortcut is no issue and should always be done when useful. Each user can set it himself to any key in prefs. If that is not done yet in this case it should be fixed.
I agree that having this or that is always nice, but JOSM is already feature overloaded and we need to take care that we don't overdo it.
by , 9 years ago
Attachment: | CopyTagsShortcut.patch added |
---|
comment:16 by , 9 years ago
Replying to stoecker:
Divided last patch to parts as suggested:
- Assigned empty shortcut
system:copytags
to "copy all keys/values" in context menu of properties dialog. Feature was already in the core, now keyboard shortcut can be customized by user to any value. Attached new patch to this ticket.
- Added entry in Edit menu to utilsplugin2 with the same shortcut: #12398.
- Moved modifications on help item of the same menu into a separate patch: #12395.
I hope you will accept these changes.
comment:17 by , 9 years ago
Summary: | [patch] copy tags action → [patch] copy tags shortcut |
---|
comment:19 by , 9 years ago
Component: | Core → Core shortcuts |
---|---|
Keywords: | copy tags added |
Milestone: | → 16.02 |
+1 for the "Copy Tags". Some remarks:
@since 404
inCopyTagsAction
is not correct ;), leave it out when unknownAbstractPrimitive#getTagsAsString
is rather confusing since it returns a list. When adding theTag
class toAbstractPrimitive
, it should be used throughout, i.e., there should be anput(Tag)
, etc. For now, I would add the required methods toCopyTagsAction
, and use it from there for "Copy all Keys/Values".