Modify

Opened 13 years ago

Closed 13 years ago

Last modified 13 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 13 years ago.
remove-primitive-selection-implementation.patch (3.2 KB) - added by hansendc 13 years ago.
optimize-selection-code.patch (2.3 KB) - added by hansendc 13 years ago.
implement-selection-storage-in-DataSet.2.patch (4.9 KB) - added by hansendc 13 years ago.
remove-primitive-selection-implementation.2.patch (3.2 KB) - added by hansendc 13 years ago.
optimize-selection-code.2.patch (2.9 KB) - added by hansendc 13 years ago.
add-ds-addSelected.patch (893 bytes) - added by hansendc 13 years ago.

Download all attachments as: .zip

Change History (14)

Changed 13 years ago by hansendc

Changed 13 years ago by hansendc

comment:1 Changed 13 years ago by Gubaer

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 Changed 13 years ago by Gubaer

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

comment:3 Changed 13 years ago by hansendc

Cc: hansendc added

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

Changed 13 years ago by hansendc

Changed 13 years ago by hansendc

comment:4 Changed 13 years ago by Gubaer

Owner: changed from team to hansendc
Status: newneedinfo

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

comment:5 Changed 13 years ago by hansendc

Status: needinfoassigned

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

Changed 13 years ago by hansendc

Attachment: add-ds-addSelected.patch added

comment:6 Changed 13 years ago by stoecker

Resolution: fixed
Status: assignedclosed

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

comment:7 Changed 13 years ago by stoecker

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.

Add Comment


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

 
Note: See TracTickets for help on using tickets.