must redraw if size changes.
authorClaus Gittinger <cg@exept.de>
Sat, 18 Apr 1998 16:25:56 +0200
changeset 867 f219de09280a
parent 866 131b89ca0150
child 868 0fa479aee842
must redraw if size changes.
TabView.st
--- a/TabView.st	Sat Apr 18 15:02:28 1998 +0200
+++ b/TabView.st	Sat Apr 18 16:25:56 1998 +0200
@@ -620,25 +620,6 @@
 
 !TabView methodsFor:'change & update'!
 
-sizeChanged:how
-    "size of view changed 
-    "
-    |extent delta|
-
-    list size ~~ 0 ifTrue:[
-        extent := super extent.
-        delta  := oldExtent - extent.
-
-        (delta x > 1 or:[delta x < -1 or:[delta y > 1 or:[delta y < -1]]]) ifTrue:[
-            oldExtent := extent.
-            self recomputeList.
-            self changed:#preferredExtent.
-        ]
-    ].
-    super sizeChanged:how
-
-!
-
 update:something with:aParameter from:changedObject
     "one of my models changed its value
     "
@@ -766,7 +747,6 @@
 
     list size == 0 ifTrue:[^ self].
 
-
     prevClipArea := clipRect.
     clipRect     := nil.
     device setClipX:x y:y width:w height:h in:drawableId gc:gcId.
@@ -783,6 +763,7 @@
     prevClipArea isNil ifTrue:[device noClipIn:drawableId  gc:gcId]
                       ifFalse:[self clippingRectangle:prevClipArea].
 
+    "Modified: / 18.4.1998 / 16:19:58 / cg"
 !
 
 selectedTab:aTab redrawBlock:aRedrawBlock
@@ -898,6 +879,30 @@
     ].
 
     super keyPress:aKey x:x y:y
+!
+
+sizeChanged:how
+    "size of view changed 
+    "
+    |extent delta dX dY|
+
+    list size ~~ 0 ifTrue:[
+        extent := super extent.
+        delta  := oldExtent - extent.
+
+        ((dX := delta x) > 1 or:[dX < -1 
+        or:[(dY := delta y) > 1 or:[dY < -1]]]) ifTrue:[
+            oldExtent := extent.
+            self recomputeList.
+            self changed:#preferredExtent.
+        ].
+        shown ifTrue:[
+            self invalidate
+        ]
+    ].
+    super sizeChanged:how
+
+    "Modified: / 18.4.1998 / 16:25:30 / cg"
 ! !
 
 !TabView methodsFor:'initialization'!
@@ -1353,5 +1358,5 @@
 !TabView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/TabView.st,v 1.33 1998-02-26 09:57:45 ca Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/TabView.st,v 1.34 1998-04-18 14:25:56 cg Exp $'
 ! !