correctly handle level changes if abs(lvl) changes
authorca
Thu, 22 Feb 1996 18:52:28 +0100
changeset 376 fb823917008e
parent 375 6656f7e8ae20
child 377 ee53da05e265
correctly handle level changes if abs(lvl) changes
ListView.st
--- a/ListView.st	Wed Feb 21 18:02:31 1996 +0100
+++ b/ListView.st	Thu Feb 22 18:52:28 1996 +0100
@@ -292,11 +292,14 @@
     "set the level - cought here to update text-position variables
      (which avoids many computations later)"
 
+    |newMargin|
+
+    newMargin := aNumber abs.
+    textStartLeft := leftMargin + newMargin.
+    textStartTop := topMargin +newMargin.
+    innerWidth := width - textStartLeft - newMargin.
+
     super level:aNumber.
-
-    textStartLeft := leftMargin + margin.
-    textStartTop := topMargin + margin.
-    innerWidth := width - textStartLeft - margin
 !
 
 lineSpacing:pixles
@@ -2800,5 +2803,5 @@
 !ListView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.62 1996-02-10 12:54:00 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.63 1996-02-22 17:52:28 ca Exp $'
 ! !