Modify

Opened 7 years ago

Closed 5 years ago

Last modified 5 years ago

#14862 closed defect (fixed)

[Patch needs review] Shift-R is broken

Reported by: hjart Owned by: team
Priority: major Milestone:
Component: Plugin utilsplugin2 Version: latest
Keywords: copy tags selection regression Cc: michael2402

Description

Shift-R (copy tags from previous selection) has been broken for a while (I usually run latest). Now when you create a new object (a node or line) and tag it, then create a second object and try to copy tags from the first object to the second using Shift-R, instead tags from whatever object was selected before the creation of the first object is copied. To correctly tag the second object the first object has to be selected a second time before using Shift-R. This makes the function a lot less useful than it used to be.

Attachments (3)

14862.patch (2.7 KB ) - added by GerdP 5 years ago.
14862-v2.patch (2.7 KB ) - added by GerdP 5 years ago.
14862-v3.patch (6.9 KB ) - added by GerdP 5 years ago.
requires JOSM r14518 or newer

Download all attachments as: .zip

Change History (34)

comment:1 by maxerickson@…, 7 years ago

Same or similar issue with newly added tags not getting picked up.

comment:2 by Don-vip, 7 years ago

Component: CorePlugin utilsplugin2
Keywords: copy tags selection added; Shift-R removed

comment:3 by michael2402, 7 years ago

Ticket #14922 has been marked as a duplicate of this ticket.

comment:4 by stoecker, 7 years ago

Ticket #14927 has been marked as a duplicate of this ticket.

comment:5 by MKnight, 7 years ago

Bug is between 12040 and 12057 somewhere here: https://josm.openstreetmap.de/changeset?sfp_email=&sfph_mail=&reponame=josm&new=12057%40%2F&old=12040%40%2F&sfp_email=&sfph_mail=

would be nice if there are all versions (not only the published) available at the website in the future ... than its possible for Daus and/or not programmers like me, to find when a bug _exactly_ was born ... and give the Information here for easier and/or faster fixing.

Last edited 7 years ago by MKnight (previous) (diff)

comment:6 by Don-vip, 7 years ago

Keywords: regression added

Michael, can you please have a look to see if it's a core regression or if the plugin needs to be updated to latest selection events changes?

comment:7 by kre3d, 7 years ago

Started occurring after [12051], which causes the updateEnabledState callback of JosmAction to no longer trigger when the tags of the selection have changed.

comment:8 by AndrewBuck, 7 years ago

Ticket #15002 has been marked as a duplicate of this ticket.

comment:9 by Don-vip, 7 years ago

Ticket #15339 has been marked as a duplicate of this ticket.

comment:10 by Don-vip, 7 years ago

Priority: normalmajor

comment:11 by hjart, 7 years ago

Version: testedlatest

comment:12 by Klumbumbus, 7 years ago

What's the status of this ticket?

comment:13 by Don-vip, 7 years ago

I began to look at it this week but don't understand how it works yet. I hope to fix it this week-end.

comment:14 by kre3d, 7 years ago

I've been using a build with [12051] reverted with no problems.

FWIW other actions that depend on the tags of the selected object are also affected by the regression in [12051], e.g. Update Multipolygon. Prior to [12051], selecting a multipolygon then deleting the type=multipolygon tag would disable the Update Multipolygon action. After [12051], the action will remain enabled until the object is reselected.

comment:15 by AlaskaDave, 6 years ago

2017-12-19 Please, please, fix this. It has always been a huge timesaver for me. I miss this feature tremendously and I'm sure others do as well.

Thanking you profusely in advance,

AlaskaDave

comment:16 by hjart, 6 years ago

Yes, can someone please have a look at this. I'm still trying to use this all the time every day :-(

comment:17 by stephankn, 6 years ago

Cc: michael2402 added

by GerdP, 5 years ago

Attachment: 14862.patch added

comment:18 by GerdP, 5 years ago

Summary: Shift-R is broken[Patch needs review] Shift-R is broken

@team: Problem is that the plugin does not react on a TagsChangedEvent.
Open problems with this patch:

  • I am not 100% sure that I understood what the FireMode.IMMEDIATELY means.
  • It is also not clear to me what should happen when one selects multiple objects and adds or removes a tag.
  • When you undo something this might also fire a TagsChangedEvent and thus the next Shift+R might add unexpected tags.

Don't know how to improve this further.

by GerdP, 5 years ago

Attachment: 14862-v2.patch added

comment:19 by GerdP, 5 years ago

With v2 the 3rd problem (undo) seems to be solved, now it only reacts when the tags of a selected object are changed.

comment:20 by GerdP, 5 years ago

I still try to fix this. I can't remember exactly how it behaved.
What should happen when you

  • first select an object with e.g. highway=service + service=driveway
  • next select another way with tag highway=path + surface=unpaved
  • next press Shift+R. My understanding is that the 2nd way shoud be changed to highway=service + service=driveway + surface=unpaved
  • next select another way with tag highway=unclassfied and press Shift+R again. Should it be changed to

highway=highway=service + service=driveway or
highway=service + service=driveway + surface=unpaved?

comment:21 by GerdP, 5 years ago

OK, I've tried with JOSM r12040 and plugin version 33212. It collects the tags of the selected objects, so the result for my example is highway=service + service=driveway + surface=unpaved.
I'll try to get this behaviour back again.

comment:22 by AlaskaDave, 5 years ago

It's been so long since it was working that I've forgotten the details but I do remember that the last way you added or modified was somehow remembered. You could then apply those same tags to the next object(s) you selected by typing [Shift]-R. Those tags would remain in the buffer and could be applied to any number of other objects whether new objects or existing ones. Once you change a tag or add a new tag that would update the buffer contents so that afterward the new tag set would be applied to subsequent objects by typing [Shift]-R

Thanks for working on this. I miss the [Shift]-R function every single day.

by GerdP, 5 years ago

Attachment: 14862-v3.patch added

requires JOSM r14518 or newer

comment:23 by GerdP, 5 years ago

I think with 14862-v3.patch Shift+R works fine again but it requires JOSM r14518 or never.
@team: Do I commit a change to a plugin which requires an untested version of JOSM?
Alternative would be to double the code in the plugin until the new version is tested.

comment:24 by stoecker, 5 years ago

Set the required JOSM version in build.xml. The rest is automatic.

comment:25 by GerdP, 5 years ago

The wiki is not clear about this. What happens when you execute tested version of JOSM and update the plugins? Will it ignore the newer plugin or will it first update the plugin and next tell the user to update JOSM to an untested version?

Last edited 5 years ago by GerdP (previous) (diff)

comment:26 by stoecker, 5 years ago

JOSM will always download the last version with compatible API (downwards) if the entries are correct. Development thus always continues without caring for tested versions.

comment:27 by GerdP, 5 years ago

fixed with [o34767:34768]
Shift+R pastes the tags of the last edited or selected object(s). If multiple objects were selected, only the common tags are pasted.

comment:28 by GerdP, 5 years ago

Resolution: fixed
Status: newclosed

comment:29 by AlaskaDave, 5 years ago

Okay, that all sounds great! Thank you very much, Gerd.

Now, how do I use the patched plugin? I tried updating plugins but JOSM told me they were all up-to-date.

in reply to:  29 comment:30 by GerdP, 5 years ago

Replying to AlaskaDave:

Okay, that all sounds great! Thank you very much, Gerd.

Now, how do I use the patched plugin? I tried updating plugins but JOSM told me they were all up-to-date.

That is good. See comment:23

comment:31 by AlaskaDave, 5 years ago

OMG! It works again. [Shift]-R WORKS AGAIN!

I'm deliriously happy.

Dave

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.