Modify

Opened 13 years ago

Closed 13 years ago

#6652 closed defect (fixed)

[PATCH] Members list in history panel for relations and ways is broken

Reported by: Zverikk Owned by: olejorgenb
Priority: normal Milestone:
Component: Core Version: latest
Keywords: Cc:

Description

  1. Select a relation with more than one version
  2. Open history panel and click "Show"
  3. Select "Members" tab
  4. Observe the left table. It shows one member all the way and has no sense.

Attachments (3)

josm-history-repeating.gif (26.7 KB ) - added by Zverikk 13 years ago.
ticket-6652-last-member-repeated-in-history-diff.patch (2.8 KB ) - added by olejorgenb 13 years ago.
ticket-6652-last-member-repeated-in-history-diff-v2.patch (3.5 KB ) - added by olejorgenb 13 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 by Don-vip, 13 years ago

Could you attach a screenshot explaining the problem ? I don't understand your concern.

by Zverikk, 13 years ago

Attachment: josm-history-repeating.gif added

comment:2 by Zverikk, 13 years ago

I've desribed the bug incorrectly. Actually, there are two list of nodes for a way (or nodes+ways for a relation) in history window, "Members" tab. They are always of the same size, regardless of actual number of nodes. Lists are padded with the last node ID, resulting in a sequence of repeating IDs, making no sense. Empty lines should be shown instead. Check right column on the screenshot.

Last edited 13 years ago by Zverikk (previous) (diff)

comment:3 by olejorgenb, 13 years ago

Owner: changed from team to olejorgenb
Status: newassigned
Summary: Members list in history panel for relations is broken[PATCH] Members list in history panel for relations and ways is broken

Patch attached.

PS: The node list for way-history has the same problem

Off topic: The HistoryBrowserModel has lots of code sections like this:

if (pointInTimeType.equals(PointInTimeType.CURRENT_POINT_IN_TIME)) {
    if (! current.getType().equals(OsmPrimitiveType.WAY))
        return null;
    return (HistoryWay)current;
}
if (pointInTimeType.equals(PointInTimeType.REFERENCE_POINT_IN_TIME)) {
    if (! reference.getType().equals(OsmPrimitiveType.WAY))
        return null;
    return (HistoryWay)reference;
}

I think HistoryBrowserModel could be simplified a lot by adding a getTargetIfValid method or maybe storing the target directly in the sub-models.

I could do something like that if it's not considered to much a case of "If It Ain't Broke, Don't Fix It"

comment:4 by olejorgenb, 13 years ago

Ups, that approach screwed up the scrollbar sync. Better patch attached.

comment:5 by stoecker, 13 years ago

Resolution: fixed
Status: assignedclosed

In [4566/josm]:

fix #6652 - patch by olejorgenb - Members list in history panel for relations and ways is broken

Modify Ticket

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