HierarchicalListView.st
changeset 4881 d1d41ecbc303
parent 4859 4c7eb9125cf2
child 4896 da341597ded6
--- a/HierarchicalListView.st	Sat Dec 19 04:37:23 2015 +0000
+++ b/HierarchicalListView.st	Mon Dec 21 12:03:02 2015 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1999 by eXept Software AG
 	      All Rights Reserved
@@ -983,8 +981,9 @@
 
     UserPreferences current showDottedLinesInTree ifFalse:[^ self].
 
-    item := list at:start ifAbsent:[^ nil ].
-
+    item := list at:start ifAbsent:nil.
+    item isNil ifTrue:[^ nil].
+    
     self paint:lineColor on:bgColor.
 
     OperatingSystem isMSWINDOWSlike ifTrue:[
@@ -999,10 +998,12 @@
     list from:start to:stop do:[:eachItem|
         self drawVericalLineForElement:eachItem minX:xL maxX:xR.
     ].
-    [ (item := item parent) notNil ] whileTrue:[
-        self drawVericalLineForElement:item minX:xL maxX:xR.
+    item notNil ifTrue:[
+        [ (item := item parent) notNil ] whileTrue:[
+            self drawVericalLineForElement:item minX:xL maxX:xR.
+        ].
     ].
-
+    
     "/ draw all the horizontal lines
     yNext := self yVisibleOfLine:start.