Modify

Ticket #4055 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

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

Reported by: mjulius Owned by: team
Priority: normal 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

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

Change History

Changed 2 years ago by mjulius

comment:1 Changed 2 years ago by mjulius

  • Version set to latest

comment:2 Changed 2 years ago by stoecker

  • Status changed from new to closed
  • Resolution set to fixed

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

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'reopened'
Author


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

 
Note: See TracTickets for help on using tickets.