SelectionInTreeView.st
changeset 528 2ece346ad954
parent 517 14a46095db49
child 529 d92232a9ce41
--- a/SelectionInTreeView.st	Mon Sep 15 22:45:47 1997 +0200
+++ b/SelectionInTreeView.st	Tue Sep 16 00:25:38 1997 +0200
@@ -581,29 +581,36 @@
     "
     |y x t|
 
+    x := y := 0.
+
     imageOpened isNil ifTrue:[
-        imageOpened := (self class imageOpened) onDevice:device.
+        imageOpened := self class imageOpened.
+        imageOpened notNil ifTrue:[
+	    imageOpened := imageOpened onDevice:device.
+            y := y max:(imageOpened heightOn:self).
+            x := x max:(imageOpened widthOn:self).
+	]
     ].
 
     imageClosed isNil ifTrue:[
-        imageClosed := (self class imageClosed) onDevice:device.
+        imageClosed := self class imageClosed.
+        imageClosed notNil ifTrue:[
+	    imageClosed := imageClosed onDevice:device.
+            y := y max:(imageClosed heightOn:self).
+            x := x max:(imageClosed widthOn:self).
+	].
     ].
 
     imageItem isNil ifTrue:[
-        imageItem := (self class imageItem) onDevice:device.
+        imageItem := self class imageItem.
+        imageItem notNil ifTrue:[
+	    imageItem := imageItem onDevice:device.
+            y := y max:(imageItem heightOn:self).
+            x := x max:(imageItem widthOn:self).
+	].
     ].
 
-    y := imageClosed heightOn:self.
-    x := imageClosed widthOn:self.
-
-    (t := imageOpened heightOn:self) > y ifTrue:[y := t].
-    (t := imageOpened widthOn:self)  > x ifTrue:[x := t].
-
-    (t := imageItem   heightOn:self) > y ifTrue:[y := t].
-    (t := imageItem   widthOn:self)  > x ifTrue:[x := t].
-
-  ^ x @ y
-
+    ^ x @ y
 !
 
 getFontParameters
@@ -1156,5 +1163,5 @@
 !SelectionInTreeView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/SelectionInTreeView.st,v 1.18 1997-09-05 12:23:03 ca Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/SelectionInTreeView.st,v 1.19 1997-09-15 22:25:38 cg Exp $'
 ! !