Modify ↓
Opened 15 years ago
Closed 15 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 by , 15 years ago
Priority: | normal → major |
---|
comment:2 by , 15 years ago
Owner: | changed from | to
---|
by , 15 years ago
Attachment: | fix-shift-selection.patch added |
---|
comment:3 by , 15 years ago
by , 15 years ago
Attachment: | fix-shift-selection-1.patch added |
---|
comment:4 by , 15 years ago
Ignore the first patch. It didn't include all of the DataSet changes needed. This new one should.
comment:5 by , 15 years ago
Summary: | Shift selection is broken → [PATCH] Shift selection is broken |
---|
by , 15 years ago
Attachment: | fix-shift-selection-2.patch added |
---|
Takes out a few unnecessary console prints.
comment:6 by , 15 years ago
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.