Modify

Opened 17 years ago

Closed 17 years ago

#122 closed defect (fixed)

Properties dialog doesn't display <different> at the right times

Reported by: josm@… Owned by: josm@…
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).

Attachments (0)

Change History (1)

comment:1 by anonymous, 17 years ago

Resolution: fixed
Status: newclosed

"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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain josm@….
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.