remember old width/height before doing a repairDamage
authorClaus Gittinger <cg@exept.de>
Mon, 09 Nov 1998 17:31:20 +0100
changeset 1712 cb753ba02fb4
parent 1711 b9d07088fe74
child 1713 33c996d5acd4
remember old width/height before doing a repairDamage in #scrollTo:redraw:; under Win32, resizes may arrive in between.
ListView.st
--- a/ListView.st	Mon Nov 09 14:34:37 1998 +0100
+++ b/ListView.st	Mon Nov 09 17:31:20 1998 +0100
@@ -3230,7 +3230,8 @@
      y1   "{ Class:SmallInteger }"
      y    "{ Class:SmallInteger }"
      x    "{ Class:SmallInteger }"
-     delta newFirstLine newViewOrigin newLeftOffset|
+     delta newFirstLine newViewOrigin newLeftOffset
+     hBefore wBefore inv|
 
     dltOrg := anOrigin - viewOrigin.
 
@@ -3307,6 +3308,8 @@
         ^ self originChanged:delta
     ].
 
+    hBefore := height.
+    wBefore := width.
     self repairDamage.
 
     self originWillChange.
@@ -3319,8 +3322,8 @@
     x == 0 ifTrue:[                                             "/ scrolling vertical
 
         y0 := textStartTop + (y abs).
-        h  := height - margin - y0.
-        w  := width - margin.
+        h  := hBefore - margin - y0.
+        w  := wBefore - margin.
 
         y > 0 ifTrue:[                                          "/ copy down
             self copyFrom:self
@@ -3334,20 +3337,18 @@
             y1 := 0.
         ].
 
-        self invalidate:((margin@y1) extent:(w@y0)).      
-        "/ self redrawX:margin y:y1 width:w height:y0.
-
+        inv := (margin@y1) extent:(w@y0).      
     ] ifFalse:[                                                 "/ scrolling horizontal
 
         x > 0 ifTrue:[                                          "/ scrolling right
             y0 := margin + x.
-            y1 := width - y0.
+            y1 := wBefore - y0.
         ] ifFalse:[                                             "/ scrolling left
             y0 := margin - x.
             y1 := 0.
         ].
-        h := height - margin - margin.
-        w := width - margin - y0.
+        h := hBefore - margin - margin.
+        w := wBefore - margin - y0.
 
         x > 0 ifTrue:[                                          "/ copy right
             self copyFrom:self x:y0 y:margin toX:margin y:margin
@@ -3358,14 +3359,15 @@
                     width:w height:h async:true.
         ].
 
-        self invalidate:((y1@margin) extent:(y0@h)).      
-        "/ self redrawX:y1 y:margin width:y0 height:h.
+        inv := (y1@margin) extent:(y0@h).      
     ].
 
+    self invalidate:inv.
+
     self waitForExpose.
     self originChanged:delta.
 
-    "Modified: / 2.10.1998 / 01:13:16 / cg"
+    "Modified: / 9.11.1998 / 17:24:53 / cg"
 ! !
 
 !ListView methodsFor:'searching'!
@@ -3835,5 +3837,5 @@
 !ListView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.176 1998-10-03 21:54:14 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.177 1998-11-09 16:31:20 cg Exp $'
 ! !