update viewOrigin when setting the list
authorca
Thu, 12 Mar 1998 19:29:05 +0100
changeset 1471 127914fa5b9c
parent 1470 01dc216e9cee
child 1472 ce2df8e79e2a
update viewOrigin when setting the list
ListView.st
--- a/ListView.st	Mon Mar 09 22:25:07 1998 +0100
+++ b/ListView.st	Thu Mar 12 19:29:05 1998 +0100
@@ -763,6 +763,8 @@
         "
          dont use scroll here to avoid the redraw
         "
+        viewOrigin := 0 @ 0.
+
         oldFirst ~~ firstLineShown ifTrue:[
             self originChanged:0 @ ((oldFirst - 1) * fontHeight negated).
         ].
@@ -905,6 +907,7 @@
 "/ new - reposition horizontally if too big
     widthOfWidestLine := nil.   "/ i.e. unknown
     innerWidth >= self widthOfContents ifTrue:[
+        viewOrigin x:0.
         leftOffset := 0.
     ].
     self contentsChanged.
@@ -914,6 +917,8 @@
         oldFirst := firstLineShown.
         firstLineShown := self size - nFullLinesShown + 1.
         firstLineShown < 1 ifTrue:[firstLineShown := 1].
+
+        viewOrigin y:(firstLineShown - 1 * fontHeight).
         self originChanged:0 @ ((oldFirst - 1) negated * fontHeight).
         linesShownBefore := nil.
         shown ifTrue:[
@@ -3648,5 +3653,5 @@
 !ListView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.158 1998-03-09 16:16:12 ca Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.159 1998-03-12 18:29:05 ca Exp $'
 ! !