The Trunk: Morphic-mt.1584.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Morphic-mt.1584.mcz

commits-2
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1584.mcz

==================== Summary ====================

Name: Morphic-mt.1584
Author: mt
Time: 6 November 2019, 9:06:51.922374 am
UUID: 2e6402c5-7245-ae48-a58b-025014f95acb
Ancestors: Morphic-mt.1583

Fixes a regression in PluggableListMorph >> #getVisibleList. Also restore code formatting in that method.

Note that "3@3" referred to #hMargin in LazyListMorph, which is not required since the entire row is defined by its selection rectangle, not the beginning of the text. Still, "0@1" is required because #bottomLeft is (always) one pixel to far down.

=============== Diff against Morphic-mt.1583 ===============

Item was changed:
  ----- Method: PluggableListMorph>>bottomVisibleRowIndex (in category 'accessing - items') -----
  bottomVisibleRowIndex
+ ^ self rowAtLocation: self scroller bottomLeft - (0@1)!
- ^ self rowAtLocation: self bottomLeft+(3@3 negated)!

Item was changed:
  ----- Method: PluggableListMorph>>topVisibleRowIndex (in category 'accessing - items') -----
  topVisibleRowIndex
+ ^ self rowAtLocation: self scroller topLeft!
- ^ self rowAtLocation: self topLeft+(3@3)!

Item was changed:
  ----- Method: PluggableListMorph>>visibleList (in category 'accessing') -----
  visibleList
+ "For convenience. Avoid accessing #getList directly. Just use the same protocol that my #listMorph uses."
+
+ ^ self listSize = 0
+ ifTrue: [ Array empty ]
+ ifFalse:
+ [ (self topVisibleRowIndex to: self bottomVisibleRowIndex) collect:
+ [ :viewIndex |
+ self itemAt: viewIndex ] ].!
-
- ^ (self topVisibleRowIndex to: (self bottomVisibleRowIndex min: self listSize))
- collect: [:viewIndex | self itemAt: viewIndex].!