# HG changeset patch # User ca # Date 873203107 -7200 # Node ID 62009576ca33e3505da99ce065bdfd409cb2d6ea # Parent cec1f174397e526472b91c3bb3082c41812351ff checkin from browser diff -r cec1f174397e -r 62009576ca33 UIHelpTool.st --- a/UIHelpTool.st Tue Sep 02 14:21:17 1997 +0200 +++ b/UIHelpTool.st Tue Sep 02 14:25:07 1997 +0200 @@ -511,7 +511,7 @@ listSelection:aSelection "current selection changed " - |txt col line view sel| + |txt view sel| aSelection isNumber ifTrue:[ aSelection ~~ 0 ifTrue:[ @@ -526,44 +526,24 @@ ] ]. - listSelection = sel ifTrue:[ - ^ self - ]. - listSelection := sel. + listSelection = sel ifFalse:[ + listSelection := sel. - modifiedHolder notNil ifTrue:[ - modifiedHolder value:true. - ]. - - (view := self editTextView) isNil ifTrue:[ - ^ self - ]. + modifiedHolder notNil ifTrue:[ + modifiedHolder value:true. + ]. - listSelection notNil ifTrue:[ - txt := dictionary at:(listSelection asSymbol) ifAbsent:nil. - ]. - - (txt isNil or:[maxCharsPerLine isNil]) ifTrue:[ - col := txt. - ] ifFalse:[ - col := OrderedCollection new. + (view := self editTextView) notNil ifTrue:[ + listSelection notNil ifTrue:[ + txt := dictionary at:(listSelection asSymbol) ifAbsent:nil. - txt asString asCollectionOfWords do:[:aWord| - line isNil ifTrue:[ - line := aWord - ] ifFalse:[ - (line size + aWord size) >= maxCharsPerLine ifTrue:[ - col add:line. - line := aWord - ] ifFalse:[ - line := line, ' ', aWord + (txt isNil or:[maxCharsPerLine isNil]) ifFalse:[ + txt := UIPainter convertString:(txt asString) maxLineSize:maxCharsPerLine. ] ]. - ]. - line notNil ifTrue:[col add:line]. - ]. - view contents:col. - + view contents:txt. + ] + ] ! !