Modify

Opened 12 years ago

Closed 12 years ago

#4055 closed defect (fixed)

[Patch] OsmPrimitive.compareTo() returns treats all new primitives as equal

Reported by: mjulius Owned by: team
Priority: normal Milestone:
Component: Core Version: latest
Keywords: Cc:

Description

Because all the compareTo() methods use getId() to compare primitives and getId() returns 0 for all new primitives (with ID < 0) all new primitives compare equal.

With the attached patch compareTo() uses getUniqueId().

This for example affects the count of primitives moved when JOSM determines whether to display a warning about moving many primitives. The warning only pops up when the amount of old nodes exceed the limit.

Attachments (1)

OsmPrimitive.compareTo.patch (1.7 KB) - added by mjulius 12 years ago.

Download all attachments as: .zip

Change History (3)

Changed 12 years ago by mjulius

comment:1 Changed 12 years ago by mjulius

Version: latest

comment:2 Changed 12 years ago by stoecker

Resolution: fixed
Status: newclosed

(In [2555]) fixed #4055 - patch my mjulius - fix object compare

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.