Modify ↓
Opened 13 years ago
Closed 13 years ago
#3780 closed defect (fixed)
[PATCH] Shift selection is broken
Reported by: | Daeron | Owned by: | hansendc |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Core | Version: | |
Keywords: | Cc: |
Description
When adding primitives to the selection by shift clicking, the primitives are added twice to the list. The duplicates are usually, but not always removed when something else is added to the selection.
This bug was introduced in r2309.
Attachments (3)
Change History (9)
comment:1 Changed 13 years ago by
Priority: | normal → major |
---|
comment:2 Changed 13 years ago by
Owner: | changed from team to hansendc |
---|
Changed 13 years ago by
Attachment: | fix-shift-selection.patch added |
---|
comment:3 Changed 13 years ago by
Changed 13 years ago by
Attachment: | fix-shift-selection-1.patch added |
---|
comment:4 Changed 13 years ago by
Ignore the first patch. It didn't include all of the DataSet changes needed. This new one should.
comment:5 Changed 13 years ago by
Summary: | Shift selection is broken → [PATCH] Shift selection is broken |
---|
Changed 13 years ago by
Attachment: | fix-shift-selection-2.patch added |
---|
Takes out a few unnecessary console prints.
comment:6 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
I think this may have actually been a bug in SelectAction.java that the changes in the DataSet just revealed.
The issue was that we were firing a selection change event with the data that the addSelected() caller passed in. That's a bit silly now since we have a copy of the entire selection now in the selectedPrimitives. So, don't allow users to pass in a selection to fireSelectionChanged(). They must change the selection, then let us fire it.
Also, add some more selection helper functions, and use them in the SelectAction code. This takes out the explicit for loop and the copy of the selection buffer which should make large selections faster. I think it also simplifies the code quite a bit. Basically, we don't keep a working copy of the selection list any more. We depend on the DataSet to do it for us.