Opened 17 years ago
Closed 17 years ago
#122 closed defect (fixed)
Properties dialog doesn't display <different> at the right times
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Core | Version: | latest |
Keywords: | Cc: |
Description
If you select two ways with different highway tags, it doesn't display <different>.
The problem is with the code in PropertiesDialog.selectionChanged (line 361):
value.getEditor().setItem(valueCount.get(e.getKey()) != newSelection.size() ? tr("<different>") : e.getValue().iterator().next());
In the case above what it does is that every object has that tag (valueCount==size) so it displays the first one.
The easiest solution may be changing newSelection.size() to e.getValue().size(). However, this loses the current behaviour that when selecting a waterway and a highway that it displays both as <different>.
Discussing this on IRC gave the following idea:
- If all objects have the same tag with the same value, display that tag/value
- If not all object have a particular tag but those that do have the same value, display that tag/value italicised.
- If different values, display <different> as now.
I would be willing to supply a patch if there is interest in the latter solution (assuming my java skills are up to it).
"No property" does sometimes has a specific meaning, as example usually a missing "oneway:yes" does mean the way is two-way.
If in doubt, you can always do a deselecting-search for "oneway:" to remove all ways without that property. If there is really a need to fast distinguish non-empty from missing properties, please file a different feature request for that.
I fixed the original behaviour. It should display <different> correctly in the next revision.