Modify

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#3696 closed enhancement (fixed)

[PATCH] Replace OsmPrimitive selection implementation with storage in DataSet

Reported by: hansendc Owned by: hansendc
Priority: normal Milestone:
Component: Core Version: latest
Keywords: Cc: Gubaer, hansendc

Description

There will be three patches attached here:

  1. implement a LinkedHashSet inside DataSet to track selected objects
  2. Remove the OsmPrimitive selection functions
  3. Use the new LinkedHashSet to optimize a few operation in the DataSet

The LinkedHashSet should preserve ordering. The first item selected should be the first item returned from all of the functions that query selections. If an item is reselected, such as if a user clicked on it, then drew a box around it with Ctrl, the order of the first selection is maintained. This is due to the LinkedHashSet implementation.

Attachments (7)

implement-selection-storage-in-DataSet.patch (4.8 KB ) - added by hansendc 15 years ago.
remove-primitive-selection-implementation.patch (3.2 KB ) - added by hansendc 15 years ago.
optimize-selection-code.patch (2.3 KB ) - added by hansendc 15 years ago.
implement-selection-storage-in-DataSet.2.patch (4.9 KB ) - added by hansendc 15 years ago.
remove-primitive-selection-implementation.2.patch (3.2 KB ) - added by hansendc 15 years ago.
optimize-selection-code.2.patch (2.9 KB ) - added by hansendc 15 years ago.
add-ds-addSelected.patch (893 bytes ) - added by hansendc 15 years ago.

Download all attachments as: .zip

Change History (14)

by hansendc, 15 years ago

comment:1 by Gubaer, 15 years ago

I can't apply the patches. Two problems identified so far:

  • declaration of selectedPrimitves in DataSet missing?
  • I have to manually fix tweak the patch in order to apply it. These lines make trouble, in particular to first one:
    --- core/src/org/openstreetmap/josm/data/osm/DataSet.java~implement-selection-storage-in-DataSet	2009-10-11 14:48:26.000000000 -0700
    +++ core-dave/src/org/openstreetmap/josm/data/osm/DataSet.java	2009-10-11 14:48:57.000000000 -0700
    

comment:2 by Gubaer, 15 years ago

Summary: Replace OsmPrimitive selection implementation with storage in DataSet[PATCH] Replace OsmPrimitive selection implementation with storage in DataSet

comment:3 by hansendc, 15 years ago

Cc: hansendc added

Here are 3 updated patches. They've been updated to the latest svn

by hansendc, 15 years ago

comment:4 by Gubaer, 15 years ago

Owner: changed from team to hansendc
Status: newneedinfo

Again, build is broken after the patches are applied (addSelected() on DataSet is missing)

comment:5 by hansendc, 15 years ago

Status: needinfoassigned

Ugh. Too many patches in too many tickets. ant is also really bad at finding .class files that are out of date.

by hansendc, 15 years ago

Attachment: add-ds-addSelected.patch added

comment:6 by stoecker, 15 years ago

Resolution: fixed
Status: assignedclosed

(In [2309]) applied #3696 - patch by Dave - removed primitive based selection

comment:7 by stoecker, 15 years ago

Please, please don't make multi-file patches. It's a pain to apply them.

Modify Ticket

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