[BUG][Fix]List selection improperly highlighted in MVC

Michael Donegan invader at zilker.net
Thu Nov 4 20:50:54 UTC 1999


This is an MVC fix, but it has bugged me for a long time. The difficulty
was finding the case that caused the problem.

In an MVC browser, click in one of the lists. Scroll up until the
selection is not visible. Then scroll back down and the selection is not
highlighted. Click somewhere else and now both are highlighted.

This fixes that problem:

'From Squeak 2.5 of August 6, 1999 on 4 November 1999 at 2:32:17 pm'!

!ListView methodsFor: 'display box access' stamp: 'mkd 11/4/1999 14:31'!
isSelectionBoxClipped
        "Answer whether there is a selection and whether the selection
is
visible 
        on the screen."

        ^selection ~= 0 & (self selectionBox intersects: 
                        (self clippingBox insetBy: (Rectangle left: 0
right:0 top: 1 bottom: 0))) not! !





More information about the Squeak-dev mailing list