SimpleView.st
changeset 6719 6805c57dfff3
parent 6716 e9b2ebb0e8cf
child 6720 a5858f01bcd8
--- a/SimpleView.st	Tue Jan 06 12:36:13 2015 +0100
+++ b/SimpleView.st	Tue Jan 06 12:36:43 2015 +0100
@@ -1895,12 +1895,12 @@
     prevMargin := margin.
     border := aBorder.
     self computeMargin.
-
+    "/ realized ifTrue:
     m := prevMargin max:margin.
-    self invalidate:(0@0 corner:width@m) repairNow:false.  "/ top margin
-    self invalidate:(width-m@m corner:width@height) repairNow:false.  "/ right margin
-    self invalidate:(0@(height-m) corner:width@height) repairNow:false.  "/ bottom margin
-    self invalidate:(0@m corner:m@height-m) repairNow:false.  "/ left margin
+    self clearAndInvalidate:(0@0 corner:width@m).  "/ top margin
+    self clearAndInvalidate:((width-m)@m corner:width@height).  "/ right margin
+    self clearAndInvalidate:(0@(height-m) corner:width@height).  "/ bottom margin
+    self clearAndInvalidate:(0@m corner:m@(height-m)).  "/ left margin
 !
 
 borderColor
@@ -2026,6 +2026,13 @@
     "Modified: 5.6.1996 / 14:12:05 / cg"
 !
 
+clearAndInvalidate:aRectangle
+    realized ifTrue:[
+        self clearRectangle:aRectangle.
+        self invalidate:aRectangle repairNow:false. 
+    ].
+!
+
 computeMargin
     border isNil ifTrue:[
 	margin := level abs.
@@ -11310,11 +11317,11 @@
 !SimpleView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.775 2015-01-05 20:35:37 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.776 2015-01-06 11:36:43 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.775 2015-01-05 20:35:37 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.776 2015-01-06 11:36:43 cg Exp $'
 !
 
 version_SVN