--- a/HierarchicalListView.st Sun May 23 14:56:33 1999 +0200
+++ b/HierarchicalListView.st Sun May 23 17:43:06 1999 +0200
@@ -274,38 +274,34 @@
y0 "{ Class:SmallInteger }"
y1 "{ Class:SmallInteger }"
|
+ item := list at:aLnNr ifAbsent:nil.
- (arg == #icon or:[arg == #hierarchy]) ifFalse:[
+ (item isNil or:[(arg ~~ #icon and:[arg ~~ #hierarchy])]) ifTrue:[
^ super lineChangedAt:aLnNr with:arg
].
+
y0 := (self yVisibleOfLine:aLnNr) max:margin.
y1 := (self yVisibleOfLine:(aLnNr + 1)) min:(height - margin).
- (h := y1 - y0) > 0 ifTrue:[
- x0 := margin.
- x1 := width - margin.
-
- (item := list at:aLnNr ifAbsent:nil) isNil ifFalse:[
- lv := item level.
- x0 := self xOfFigureLevel:lv.
- x1 := x0 + imageWidth.
+ (h := y1 - y0) > 0 ifFalse:[
+ ^ self
+ ].
+ lv := item level.
+ x0 := self xOfFigureLevel:lv.
+ x1 := x0 + imageWidth.
- arg == #hierarchy ifTrue:[
- x0 := self xOfFigureLevel:(lv -1).
- ].
- x0 := x0 max:margin.
- x1 := x1 min:(width - margin).
+ arg == #hierarchy ifTrue:[
+ x0 := self xOfFigureLevel:(lv -1).
+ ].
+ x0 := x0 max:margin.
+ x1 := x1 min:(width - margin).
- x1 > x0 ifFalse:[
- ^ self
- ]
- ].
- self redrawX:x0 y:y0 width:x1 - x0 height:h.
+ x1 > x0 ifTrue:[
+ self invalidateX:x0 y:y0 width:x1 - x0 height:h
]
-
!
update:what with:aPara from:chgObj
@@ -556,7 +552,7 @@
x := x max:margin.
(w := width - x) > 0 ifTrue:[
- self redrawX:x y:y width:w height:h
+ self invalidateX:x y:y width:w height:h
]
@@ -753,7 +749,7 @@
height := item heightOn:self.
(icon := self figureFor:item) notNil ifTrue:[
- height := (item heightOn:self) max:height.
+ height := (icon heightOn:self) max:height.
].
^ lineSpacing + height
@@ -885,5 +881,5 @@
!HierarchicalListView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg2/HierarchicalListView.st,v 1.1 1999-05-23 12:56:26 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg2/HierarchicalListView.st,v 1.2 1999-05-23 15:43:04 cg Exp $'
! !