oops - must invalidate deviceRectangle in scroll.
authorClaus Gittinger <cg@exept.de>
Tue, 10 Nov 1998 19:04:43 +0100
changeset 2396 da3125ce46f1
parent 2395 93846300ef6f
child 2397 d1f0fda167af
oops - must invalidate deviceRectangle in scroll.
SimpleView.st
--- a/SimpleView.st	Tue Nov 10 01:55:54 1998 +0100
+++ b/SimpleView.st	Tue Nov 10 19:04:43 1998 +0100
@@ -6830,6 +6830,29 @@
     "Modified: / 10.11.1998 / 01:55:03 / cg"
 !
 
+invalidateDeviceRectangle:aRectangle repairNow:doRepair
+    "add a damage to redraw part of the receiver, to its input event queue.
+     and (if repairNow is true), force the receiver to repair all of its 
+     damaged areas right now."
+
+    |sensor|
+
+    (sensor := self sensor) notNil ifTrue:[
+        sensor addDamage:aRectangle view:self.
+        (shown and:[doRepair]) ifTrue:[
+            self repairDamage
+        ]
+    ] ifFalse:[
+        shown ifTrue:[
+            self redrawDeviceX:aRectangle left y:aRectangle top
+                         width:aRectangle width height:aRectangle height
+        ].
+    ]
+
+    "Modified: / 10.11.1998 / 01:55:03 / cg"
+    "Created: / 10.11.1998 / 19:02:01 / cg"
+!
+
 invalidateRepairNow:doRepair
     "add a damage to redraw all of the receiver, to its input event queue.
      and (if repairNow is true), force the receiver to repair all of its 
@@ -7337,8 +7360,7 @@
              copied area (with full width)."
 
             copyHeight < ih ifTrue:[     
-                self invalidate:((margin@redrawY)
-                                  extent:(iw@(ih - copyHeight))).      
+            self invalidateDeviceRectangle:((margin@redrawY) extent:(iw@(ih - copyHeight))) repairNow:false.      
 "/                self 
 "/                    redrawDeviceX:margin y:redrawY 
 "/                    width:iw height:(ih - copyHeight).
@@ -7348,8 +7370,7 @@
              copied area"
 
             copyWidth < iw ifTrue:[
-                self invalidate:((redrawX@toY)
-                                  extent:((iw-copyWidth)@copyHeight)).      
+            self invalidateDeviceRectangle:((redrawX@toY) extent:((iw-copyWidth)@copyHeight)) repairNow:false.      
 "/                self redrawDeviceX:redrawX y:toY 
 "/
 "/                             width:iw - copyWidth 
@@ -7360,8 +7381,7 @@
             "redraw everything"
 
             self setViewOrigin:(x @ y).
-            self invalidate:((margin@margin)
-                              extent:(iw@ih)).      
+            self invalidateDeviceRectangle:((margin@margin) extent:(iw@ih)) repairNow:false.      
 "/            self redrawDeviceX:margin y:margin
 "/                         width:iw
 "/                        height:ih.
@@ -7372,7 +7392,7 @@
     self originChanged:(dX negated @ dY negated).
 
     "Modified: / 5.8.1996 / 11:57:09 / stefan"
-    "Modified: / 23.9.1998 / 01:09:03 / cg"
+    "Modified: / 10.11.1998 / 19:03:30 / cg"
 ! !
 
 !SimpleView methodsFor:'startup'!
@@ -7907,6 +7927,6 @@
 !SimpleView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.281 1998-11-10 00:55:54 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.282 1998-11-10 18:04:43 cg Exp $'
 ! !
 SimpleView initialize!