Changeset 2555 in josm for trunk/src/org


Ignore:
Timestamp:
2009-11-30T16:10:21+01:00 (15 years ago)
Author:
stoecker
Message:

fixed #4055 - patch my mjulius - fix object compare

Location:
trunk/src/org/openstreetmap/josm/data/osm
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/Node.java

    r2512 r2555  
    161161
    162162    public int compareTo(OsmPrimitive o) {
    163         return o instanceof Node ? Long.valueOf(getId()).compareTo(o.getId()) : 1;
     163        return o instanceof Node ? Long.valueOf(getUniqueId()).compareTo(o.getUniqueId()) : 1;
    164164    }
    165165
  • trunk/src/org/openstreetmap/josm/data/osm/Relation.java

    r2512 r2555  
    231231
    232232    public int compareTo(OsmPrimitive o) {
    233         return o instanceof Relation ? Long.valueOf(getId()).compareTo(o.getId()) : -1;
     233        return o instanceof Relation ? Long.valueOf(getUniqueId()).compareTo(o.getUniqueId()) : -1;
    234234    }
    235235
  • trunk/src/org/openstreetmap/josm/data/osm/Way.java

    r2512 r2555  
    241241        if (o instanceof Relation)
    242242            return 1;
    243         return o instanceof Way ? Long.valueOf(getId()).compareTo(o.getId()) : -1;
     243        return o instanceof Way ? Long.valueOf(getUniqueId()).compareTo(o.getUniqueId()) : -1;
    244244    }
    245245
Note: See TracChangeset for help on using the changeset viewer.