Modify

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#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)

CopyTagsAction.patch (10.0 KB ) - added by kolesar 9 years ago.
CopyTagsShortcut.patch (910 bytes ) - added by kolesar 9 years ago.

Download all attachments as: .zip

Change History (23)

by kolesar, 9 years ago

Attachment: CopyTagsAction.patch added

comment:1 by simon04, 9 years ago

+1 for the "Copy Tags". Some remarks:

  • Unfortunately, almost any shortcut is already taken, see DevelopersGuide/ShortcutsList
  • @since 404 in CopyTagsAction is not correct ;), leave it out when unknown
  • The name AbstractPrimitive#getTagsAsString is rather confusing since it returns a list. When adding the Tag class to AbstractPrimitive, it should be used throughout, i.e., there should be an put(Tag), etc. For now, I would add the required methods to CopyTagsAction, and use it from there for "Copy all Keys/Values".

comment:2 by stoecker, 9 years ago

How's that different from PasteTags action where you copy the objects, but only paste the tags?

comment:3 by simon04, 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 stoecker, 9 years ago

This is an utilsplugin change in this case. Should not be in the core (except for the cleanup parts).

Last edited 9 years ago by stoecker (previous) (diff)

comment:5 by kolesar, 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 stoecker, 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.

comment:7 by kolesar, 9 years ago

Should I create a new ticket or simply modify component to utilsplugin2?

comment:8 by simon04, 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 ;).

in reply to:  8 comment:9 by kolesar, 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.

comment:10 by simon04, 9 years ago

CMD+SHIFT+T: Unfortunately not – it is used in the reverter plugin …

in reply to:  10 ; comment:11 by bastiK, 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. ;)

in reply to:  11 comment:12 by kolesar, 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 stoecker, 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.

comment:14 by kolesar, 9 years ago

What do you think about assigning a shortcut to existing action on properties dialog without an additional entry in Edit menu?

in reply to:  14 ; comment:15 by stoecker, 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 kolesar, 9 years ago

Attachment: CopyTagsShortcut.patch added

in reply to:  15 comment:16 by kolesar, 9 years ago

Replying to stoecker:

Divided last patch to parts as suggested:

  1. 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.
  1. Added entry in Edit menu to utilsplugin2 with the same shortcut: #12398.
  1. Moved modifications on help item of the same menu into a separate patch: #12395.

I hope you will accept these changes.

comment:17 by kolesar, 9 years ago

Summary: [patch] copy tags action[patch] copy tags shortcut

comment:18 by stoecker, 9 years ago

Sounds all fine to me.

comment:19 by Don-vip, 9 years ago

Component: CoreCore shortcuts
Keywords: copy tags added
Milestone: 16.02

comment:20 by Don-vip, 9 years ago

Resolution: fixed
Status: newclosed

In 9592/josm:

fix #12357 - copy tags shortcut (patch by kolesar)

comment:21 by rickmastfan67, 9 years ago

The fix in #12398 introduced some 'Registered toolbar action' bugs. See #12470.

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.