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)

fix-shift-selection.patch (5.9 KB) - added by hansendc 13 years ago.
fix-shift-selection-1.patch (16.6 KB) - added by hansendc 13 years ago.
fix-shift-selection-2.patch (19.3 KB) - added by hansendc 13 years ago.
Takes out a few unnecessary console prints.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 13 years ago by Daeron

Priority: normalmajor

comment:2 Changed 13 years ago by stoecker

Owner: changed from team to hansendc

Changed 13 years ago by hansendc

Attachment: fix-shift-selection.patch added

comment:3 Changed 13 years ago by hansendc

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.

Changed 13 years ago by hansendc

Attachment: fix-shift-selection-1.patch added

comment:4 Changed 13 years ago by hansendc

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 Daeron

Summary: Shift selection is broken[PATCH] Shift selection is broken

Changed 13 years ago by hansendc

Attachment: fix-shift-selection-2.patch added

Takes out a few unnecessary console prints.

comment:6 Changed 13 years ago by Gubaer

Resolution: fixed
Status: newclosed

(In [2348]) applied #3780: patch by hansendc: Shift selection is broken

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.