Mantis - Squeak
Viewing Issue Advanced Details
1533 Morphic minor always 07-24-05 01:38 07-24-05 01:38
Eddie Cottongim  
 
normal  
new 3.8  
open  
none    
none  
0001533: Stray selection boxes in SimpleHierarchicalListMorph
Try "(1 to: 1000) explore".

Click on an item in the list and keep the button down. A "mousedown" rectangle frame appears. Move the mouse to another item. The rectangle stays on the old item. You can fill up the whole list with rectangles in this way.

The problem is partially because SimpleHierarchicalListMorph: #mouseUp, which removes the selection rectangle, only removes the rectangle at the morph for the current cursor point. You can plug this hole by adding something like this:

    startingMorph := self itemFromPoint: evt startPoint.
    endingMorph := self itemFromPoint: evt position.
    (startingMorph == endingMorph)
        ifFalse:[ startingMorph highlightForMouseDown: false.
                endingMorph highlightForMouseDown: false.
        ].

to the #mouseMove: method, but this only partially fixes the problem. It still happens if you use the mouse wheel while the button is down, and it happens if you click rapidly across the list. I'm not sure where all these other holes are. Maybe a mouseMove event is getting eaten before it gets here occasionally, too.

An alternative to fixing this is getting rid of the "mouseDown" framing rectangle thing and just immediately selecting the new item. That might be easier than tracking down all the places where the rectangle should be erased.

There are no notes attached to this issue.