#20313 closed defect (fixed)
Relation editor: Changes of "uninteresting" tags in mapview not recognized.
Reported by: | skyper | Owned by: | GerdP |
---|---|---|---|
Priority: | major | Milestone: | 21.02 |
Component: | Core | Version: | latest |
Keywords: | template_report regression relation editor | Cc: |
Description
What steps will reproduce the problem?
- Have a relation selected and open a relation editor.
- Change a tag in Tags/Membership Panel
- Try to refresh relation in relation manager
What is the expected result?
The refresh button should be enabled.
What happens instead?
The refresh button is disabled and saving the relation from the relation editor overwrites the previously made changes.
Please provide any additional information below. Attach a screenshot if possible.
I also noticed that if I select another relation in mapview and change a tag value of both relations in Tags/Membership panel to the value of the relation with open relation editor, the refresh button is enabled though there were no changes of this relation.
Relative:URL: ^/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2020-12-27 20:15:27 +0100 (Sun, 27 Dec 2020) Revision:17426 Build-Date:2020-12-28 02:30:52 URL:https://josm.openstreetmap.de/svn/trunk
Attachments (1)
Change History (23)
comment:1 Changed 19 months ago by
Owner: | changed from team to skyper |
---|---|
Status: | new → needinfo |
comment:2 Changed 19 months ago by
I tried to reproduce without success until now. Do not really understand what is going on but, maybe, it depends on memory and long editing sessions.
I fear, that when I save/close the session this error will vanish again, what to do?
comment:3 Changed 19 months ago by
I don't understand. If you cannot reproduce it, what will vanish?
comment:4 follow-up: 6 Changed 19 months ago by
Well, I happens atm, all the time, but I do not know what I have to do to get to this state.
What information is useful before I quite JOSM and start my saved session, in order to see, if I can still reproduce it then?
comment:6 Changed 19 months ago by
Replying to skyper:
Well, I happens atm, all the time, but I do not know what I have to do to get to this state.
What information is useful before I quite JOSM and start my saved session, in order to see, if I can still reproduce it then?
Hmm, maybe a field is not properly initialized.
- How many relation editor windows are open?
- Does it happen when you open the relation editor for a relation that was edited before or also for one that you didn't touch in this session?
comment:7 Changed 19 months ago by
Does not matter if the relation is new or old and if modified or not. Adding a new tag enables the refresh button but deleting tag or changing the value does not trigger it.
I only work with one relation editor most of the time but within this session I might have had five or more open at once.
comment:8 Changed 19 months ago by
OK. My understanding is that it worked fine at the beginning of the session and now it no longer does? How exactly do you change or delete a tag? Mouse clicks or hot keys?
comment:9 Changed 19 months ago by
For deleting I usually use the button of the panel. For changing and adding tags I usually use hotkeys or double click into the fields. Does not make any difference at the moment.
comment:10 Changed 19 months ago by
Ok, one difference might be that I have uploaded within this session but behavior is the same for untouched, already uploaded or new and/or modified relations, now.
comment:11 Changed 19 months ago by
OK, some minutes ago I thought I had the same situation but it disappeared and I can't say for sure that I modified the relation which was in the relation editor. I guess it only happens with multiple editor windows open and maybe something else like a layer change or undo/redo. I'll look again at this tomorrow.
comment:12 Changed 19 months ago by
Replying to Hb---:
How many data layers do you use?
Right, I work on one layer with sometimes several relation editors and I create new layers to download some data I merge to the working layer. I do not modify any data in these "download" layers and delete them after a short time but I might open a relation editor in these layers. I am pretty sure, I did not open the same relation editor in two different data layers at once.
comment:13 Changed 19 months ago by
Found a relation which always triggers the bug, see josm_20313_example.osm.xz.
- Load file
- Select relation in relation list panel and select it with the select button of this panel
- Open relation editor with Edit button of relation list panel
- Delete
FIXME=*
ordescription=*
tag by selecting the tag in the tags/membership panel and clicking on delete button.
Deleting other tags does not show the bug, so it depends on the key.
Relative:URL: ^/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2021-01-03 23:41:13 +0100 (Sun, 03 Jan 2021) Revision:17435 Build-Date:2021-01-04 02:30:49 URL:https://josm.openstreetmap.de/svn/trunk Identification: JOSM/1.5 (17435 en) Linux Debian GNU/Linux 10 (buster) Memory Usage: 175 MB / 962 MB (84 MB allocated, but free) Java version: 11.0.9.1+1-post-Debian-1deb10u2, Debian, OpenJDK 64-Bit Server VM Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel Screen: :0.0 1366×768 (scaling 1.00×1.00) Maximum Screen Size: 1366×768 Best cursor sizes: 16×16→16×16, 32×32→32×32 Desktop environment: GNOME Java package: openjdk-11-jre:amd64-11.0.9.1+1-1~deb10u2 Environment variable LANG: en_US.utf8 libcommons-compress-java: libcommons-compress-java:all-1.18-2+deb10u1 libcommons-logging-java: libcommons-logging-java:all-1.2-2 fonts-noto: fonts-noto:all-20181227-1 liboauth-signpost-java: liboauth-signpost-java:all-1.2.1.2-2 VM arguments: [-Djosm.home=<josm.pref>/] Program arguments: [Downloads/josm_20313_example.osm.xz] Dataset consistency test: No problems found
comment:14 Changed 19 months ago by
Owner: | changed from skyper to team |
---|---|
Status: | needinfo → new |
comment:15 Changed 19 months ago by
Owner: | changed from team to GerdP |
---|---|
Status: | new → assigned |
See also #20289.
It happens with all tag keys that are returned by AbstractPrimitive.getUninterestingKeys()
.
We use a method OsmPrimitive.hasEqualSemanticAttributes(OsmPrimitive other)
to compare two relations and the javadoc says
Replies true if this primitive and other are equal with respect to their semantic attributes. 1.equal id 2.both are complete or both are incomplete 3.both have the same tags
BUT this method ignores a difference of the so called uninteresting keys, and both FIXME
and description
are considered uninteresting. These two tags were added for #5174
I do not yet understand why the method ignores the uninteresting keys. The same method is used in DataSetMerger and some other methods.
comment:16 Changed 19 months ago by
Summary: | Relation editor: Changes of tags in mapview not recognized. → Relation editor: Changes of "uninteresting" tags in mapview not recognized. |
---|
comment:18 Changed 19 months ago by
This change should fix the problem only in relation editor. I think it would be better to change
-
src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
926 926 * @return true if this primitive and other are equal with respect to their semantic attributes. 927 927 */ 928 928 public final boolean hasEqualSemanticAttributes(OsmPrimitive other) { 929 return hasEqualSemanticAttributes(other, true);929 return hasEqualSemanticAttributes(other, false); 930 930 } 931 931 932 932 boolean hasEqualSemanticFlags(final OsmPrimitive other) {
so that the method matches the javadoc, but maybe I have to change the javadoc instead.
BTW: I still have no idea why some tags are considered uninteresting. The concept is very old, it was started with r367, but it seems to be about rendering.
comment:19 Changed 19 months ago by
As expected I see the same problem when I
- duplicate the layer with the relation
- change the FIXME to recheck stops2 in one layer
- change the FIXME to recheck stops3 in the other layer or delete the FIXME tag
- and finally use merge layers
There is no conflict. I think this also is an error?
comment:21 Changed 19 months ago by
Milestone: | → 21.01 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Presuming that no unit test fails this should be fixed now.
I can't reproduce this with r17432. When I change or add a tag the refresh button is enabled. Please describe more details.