Modify

Opened 15 years ago

Closed 15 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 15 years ago.

Download all attachments as: .zip

Change History (3)

by mjulius, 15 years ago

comment:1 by mjulius, 15 years ago

Version: latest

comment:2 by stoecker, 15 years ago

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