ListView.st
changeset 1234 9c7d9fb08c3f
parent 1222 0770bb87d44e
child 1240 1b3611a8e972
--- a/ListView.st	Wed Jun 04 13:21:19 1997 +0200
+++ b/ListView.st	Wed Jun 04 13:22:12 1997 +0200
@@ -366,26 +366,28 @@
     "set the font for all shown text.
      Redraws everything.
      CAVEAT: with the addition of Text objects,
-	     this method is going to be obsoleted by a textStyle
-	     method, which allows specific control over
-	     normalFont/boldFont/italicFont parameters."
+             this method is going to be obsoleted by a textStyle
+             method, which allows specific control over
+             normalFont/boldFont/italicFont parameters."
 
     aFont isNil ifTrue:[
-	^ self error:'nil font'
+        ^ self error:'nil font'
     ].
     font ~~ aFont ifTrue:[
-	super font:aFont.
-	realized ifTrue:[
-	    widthOfWidestLine := nil. "/ i.e. unknown
-	    (font graphicsDevice == device) ifTrue:[
-		self getFontParameters.
-		self computeNumberOfLinesShown.
-		shown ifTrue:[
-		    self redrawFromVisibleLine:1 to:nLinesShown
-		]
-	    ].
-	    self contentsChanged
-	]
+        super font:(aFont on:device).
+        preferredExtent := nil.
+        widthOfWidestLine := nil. "/ i.e. unknown
+        self getFontParameters.
+        realized ifTrue:[
+            (font graphicsDevice == device) ifTrue:[
+                self getFontParameters.
+                self computeNumberOfLinesShown.
+                shown ifTrue:[
+                    self redrawFromVisibleLine:1 to:nLinesShown
+                ]
+            ].
+            self contentsChanged
+        ]
     ]
 
     "Modified: 5.7.1996 / 17:55:34 / cg"
@@ -3621,5 +3623,5 @@
 !ListView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.131 1997-05-12 17:02:02 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.132 1997-06-04 11:22:12 ca Exp $'
 ! !