#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)
Change History (34)
comment:1 by , 7 years ago
comment:2 by , 7 years ago
Component: | Core → Plugin utilsplugin2 |
---|---|
Keywords: | copy tags selection added; Shift-R removed |
comment:5 by , 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.
comment:6 by , 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 , 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:10 by , 7 years ago
Priority: | normal → major |
---|
comment:11 by , 7 years ago
Version: | tested → latest |
---|
comment:13 by , 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 , 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 , 7 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 , 7 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 , 6 years ago
Cc: | added |
---|
by , 6 years ago
Attachment: | 14862.patch added |
---|
comment:18 by , 6 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 , 6 years ago
Attachment: | 14862-v2.patch added |
---|
comment:19 by , 6 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 , 6 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 , 6 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 , 6 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.
comment:23 by , 6 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:25 by , 6 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?
comment:26 by , 6 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 , 6 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 , 6 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
follow-up: 30 comment:29 by , 6 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.
comment:30 by , 6 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
Same or similar issue with newly added tags not getting picked up.