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)

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

Download all attachments as: .zip

Change History (9)

comment:1 by Daeron, 15 years ago

Priority: normalmajor

comment:2 by stoecker, 15 years ago

Owner: changed from team to hansendc

by hansendc, 15 years ago

Attachment: fix-shift-selection.patch added

comment:3 by hansendc, 15 years ago

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.

by hansendc, 15 years ago

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

comment:4 by hansendc, 15 years ago

Ignore the first patch. It didn't include all of the DataSet changes needed. This new one should.

comment:5 by Daeron, 15 years ago

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

by hansendc, 15 years ago

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

Takes out a few unnecessary console prints.

comment:6 by Gubaer, 15 years ago

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. 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.