HierarchicalListView.st
changeset 1792 26aa6dc38278
parent 1784 4b8a7a2811f5
child 1818 fe99c5c721e9
--- a/HierarchicalListView.st	Sat Jul 29 13:18:43 2000 +0200
+++ b/HierarchicalListView.st	Sat Jul 29 18:07:43 2000 +0200
@@ -554,9 +554,11 @@
      startLvX "{ Class:SmallInteger }"
      limitLvI "{ Class:SmallInteger }"
      limitLvX "{ Class:SmallInteger }"
+     imgHWdt  "{ Class:SmallInteger }"
     |
+    imgHWdt  := imageWidth // 2.
     widthLvl := imageInset + imageWidth.
-    offsHLnX := imageWidth // 2 + (self xOfFigureLevel:-1).
+    offsHLnX := imgHWdt + (self xOfFigureLevel:-1).
 
     parent   := 4711.                           "/ to force a recompute
     prevItem := 4711.                           "/ to force a recomputation of the level
@@ -617,9 +619,13 @@
             item drawHorizontalLineUpToText ifTrue:[
                 p1 := xText
             ] ifFalse:[
-                p1 := xL < endHLnX ifTrue:[endHLnX] ifFalse:[nil]
+                item hasChildren ifTrue:[
+                    p1 := endHLnX.
+                ] ifFalse:[
+                    p1 := begHLnX + imgHWdt
+                ]
             ].
-            p1 notNil ifTrue:[
+            xL < p1 ifTrue:[
                 self displayLineFromX:begHLnX y:yCtr toX:p1 y:yCtr
             ]
         ].
@@ -1021,5 +1027,5 @@
 !HierarchicalListView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/HierarchicalListView.st,v 1.29 2000-07-19 07:12:10 ca Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/HierarchicalListView.st,v 1.30 2000-07-29 16:07:43 ca Exp $'
 ! !