HierarchicalListView.st
changeset 4909 b7c864b6d6d1
parent 4896 da341597ded6
child 4949 5f8201378687
--- a/HierarchicalListView.st	Fri Dec 18 08:07:36 2015 +0100
+++ 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.