Opened 9 years ago
Closed 8 years ago
#12900 closed defect (fixed)
Conflicts in pasted tags cannot be resolved, cannot be resolved to "none"
Reported by: | Allroads | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 16.07 |
Component: | Core | Version: | latest |
Keywords: | regression | Cc: | michael2402 |
Description (last modified by )
Hello,
When I use the icon for CTRL SHIFT V,
- I have often the problem that I get not the expected tags from the clipboard.
It sometimes I set ford to it, and the next road I want to give with icon only highway tag, but then there is ford=yes from the clipboard, I know what I copied to the clipboard and,is there a learning process to give me other presumed tags in the clipboard. Looks like it overruled may copy to clipboard, what I expect.(two pics)
- Popup Conflicts in pasted tags.
What annoying is that I can not get none for a choice, this ford is sometimes set also but is do not need it, form a clipboard.
But when I choose the right tags. The apply button does not light up. (BUG)
When I choose to go not further and click the red cross (upper right), delete popup, expecting no actions is taken but all tags are set. (two pics).
Josm 10301
Java 1 80_91
Attachments (5)
Change History (16)
by , 9 years ago
Attachment: | clipboard.jpg added |
---|
by , 9 years ago
Attachment: | clipboard 2.jpg added |
---|
by , 9 years ago
Attachment: | conflict pasted tag 2.jpg added |
---|
by , 9 years ago
Attachment: | conflict pasted tag.jpg added |
---|
comment:1 by , 9 years ago
Description: | modified (diff) |
---|
comment:2 by , 9 years ago
Component: | Core bugreport → Core |
---|
follow-up: 4 comment:3 by , 9 years ago
- I don't really understand the problem. When you click on "copy all tags" then it copies the tags into the clipboard and removes the content which was there before. This is how clipboard works everywhere.
- I can confirm the two bugs.
comment:4 by , 9 years ago
Replying to Klumbumbus:
- I don't really understand the problem. When you click on "copy all tags" then it copies the tags into the clipboard and removes the content which was there before. This is how clipboard works everywhere.
- I can confirm the two bugs.
1.
I use Ctrl-C (to copy ways to other layer) or I use like in the pic "Copy all Keys/Values".
Clipboard is set, example: mostly I use last times on clipboard highway=track source=bing
Now I am drawing ways further, use button +++ (pic) to do Ctrl-Shift-V.To set tags on way. All goes well.
Then I cut a way to set a part for a ford=yes use a preset button.
Or a new way, attached to highway=unclassified / tertairy, then suddenly sometimes the clipboard is changed, and I did not use Ctrl_C or "Copy all Keys/Values". In my mind I know the key value. It is annoying that it is changed.
That's why I thought is there al self learning JOSM, josm set the clipboard by itself. Set to obvious keys/values. Last used or so. Attached to new road, so must also be the like the to attached road.
Or the unclassified is set or a ford is in the tags, this ford is really annoying, because it is not used often.
I do not like that.
Maybe this 1. is related to 2.
This is since the last two Josm updates, I believe, since bugs 2. occurred
Is there a difference/relation in use Ctrl-C or Copy All keys/Values and clipboard?
comment:5 by , 8 years ago
To reproduce 2:
- Create node with
name=foo
- Create node with
name=bar
- Select both nodes,
Ctrl+C
- Create new node, select it,
Ctrl+Shift+V
comment:6 by , 8 years ago
Keywords: | regression added |
---|---|
Summary: | Conflicts in pasted tags → Conflicts in pasted tags cannot be resolved, cannot be resolved to "none" |
comment:7 by , 8 years ago
Milestone: | → 16.07 |
---|
comment:8 by , 8 years ago
Cc: | added |
---|
comment:9 by , 8 years ago
We should unify the key/value counting while doing that. There are several places that need to handle such tag conflicts at the moment.
Places I found so far:
PropertiesDialog#selectionChanged
, starting at final Map<String, Integer> keyCount = new HashMap<>();
TagCollection
, e.g. getNumTagsFor
MultiValueResolutionDecision
uses TagCollection
internally
PasteTagsConflictResolverDialog#populate
uses TagCollection
to mostlycount keys.
TagModel
same as TagCollection
for a single key. We can replace getValueCount
with getNumTagsFor
, getValue
with getJoinedValues
TagEditHelper
same as TagCollection
with added counts.
The HashSet of TagCollection is using a HashMap<Tag, Boolean> internally. It would be no big deal to change it to a HashMap<Tag, Integer>. That way we could count the number of tags that were inserted without breaking backward compatibility. I'll write a patch for it.
comment:10 by , 8 years ago
I added a patch that addresses the issue. The patch requires #13271 (if that patch is not applied, the dialog will not be shown. An exception is printed to the console and the tags are applied without resolving the conflicts).
It displays a merge conflict in all cases (multiple primitives, multiple values) I tested. I hope I did not miss any special cases.
by , 8 years ago
Attachment: | patch-fix-12900.patch added |
---|