--- a/UIPainter.st Mon May 11 09:39:35 2009 +0200
+++ b/UIPainter.st Mon May 11 09:40:12 2009 +0200
@@ -4222,7 +4222,9 @@
list := list copyWith:(UIHelpTool label)
].
view notNil ifTrue:[
- list := list copyWith:UILayoutTool label.
+ spec hasLayout ifTrue:[
+ list := list copyWith:UILayoutTool label.
+ ]
].
"/ size := slices size.
@@ -6197,6 +6199,17 @@
!UIPainter::TreeView methodsFor:'initialization'!
+iconForNode:aNode
+ |spec|
+
+ spec := aNode contents spec.
+ spec isNil ifTrue: [
+ ^ WindowSpec icon
+ ] ifFalse:[
+ ^ spec icon
+ ]
+!
+
initialize
"initialize the tree view; multiple select and tree item actions"
@@ -6208,22 +6221,19 @@
self showDirectoryIndicatorForRoot: false.
self model
- iconAction:
- [:aNode|
- |specClass|
- (specClass := aNode contents spec) isNil
- ifTrue: [WindowSpec icon]
- ifFalse:[specClass class icon]
- ].
-
- self model
- labelAction:
- [:aNode|
- |spec|
- (spec := aNode contents spec) notNil
- ifTrue: [self nameForSpecInList:spec]
- ifFalse:[aNode name]
- ]
+ iconAction:[:aNode| self iconForNode:aNode];
+ labelAction: [:aNode | self labelForNode:aNode].
+!
+
+labelForNode:aNode
+ |spec|
+
+ spec := aNode contents spec.
+ spec notNil ifTrue: [
+ ^ self nameForSpecInList:spec
+ ] ifFalse:[
+ ^ aNode name
+ ]
! !
!UIPainter::TreeView methodsFor:'private'!