--- a/Tools_ClassList.st Mon Apr 21 18:06:10 2008 +0200
+++ b/Tools_ClassList.st Mon Apr 21 18:06:38 2008 +0200
@@ -1351,45 +1351,47 @@
|prevMode listView oldNameList newNameList sav|
self classList value isNil ifTrue:[
- self updateList
+ self updateList
].
newNameList := self nameListForClasses:(classList value ? #()).
oldNameList := self classNameList value ? #().
(newNameList
- sameContentsAs: oldNameList
- whenComparedWith:[:a :b | (a sameStringAndEmphasisAs: b)
- and:[ a hasImage == b hasImage
- and:[ a hasIcon == b hasIcon ]]]
+ sameContentsAs: oldNameList
+ whenComparedWith:[:a :b | (a sameStringAndEmphasisAs: b)
+ and:[ a hasImage == b hasImage
+ and:[ a hasIcon == b hasIcon ]]]
)
ifTrue:[
- "/ no need to update
+ "/ no need to update
] ifFalse:[
- listView := builder componentAt:#List.
- (listView isNil or:[listView scrolledView isNil]) ifTrue:[
- "/ invoked very early during setup
- self classNameList value:newNameList
- ] ifFalse:[
- "/ avoid flicker and useless redraws
+ builder notNil ifTrue:[
+ listView := builder componentAt:#List.
+ ].
+ (listView isNil or:[listView scrolledView isNil]) ifTrue:[
+ "/ invoked very early during setup
+ self classNameList value:newNameList
+ ] ifFalse:[
+ "/ avoid flicker and useless redraws
- prevMode := listView scrollWhenUpdating.
- listView scrollWhenUpdating:nil.
+ prevMode := listView scrollWhenUpdating.
+ listView scrollWhenUpdating:nil.
- "/ this will lead to a selectionIndex change (done by the selListView);
- "/ however, we dont want this here, since it recurses into
- "/ a selectionChange. Therefore, temporarily disconnect the selectionIndexHolder...
- [
- self selectedClassNameIndices removeDependent:self.
- "/ also, dont want a callback (selectionChangedByClick)
- sav := listView action.
- listView action:nil.
- self classNameList value:newNameList.
- ] ensure:[
- listView action:sav.
- self selectedClassNameIndices addDependent:self.
- listView scrollWhenUpdating:prevMode.
- ].
- ]
+ "/ this will lead to a selectionIndex change (done by the selListView);
+ "/ however, we dont want this here, since it recurses into
+ "/ a selectionChange. Therefore, temporarily disconnect the selectionIndexHolder...
+ [
+ self selectedClassNameIndices removeDependent:self.
+ "/ also, dont want a callback (selectionChangedByClick)
+ sav := listView action.
+ listView action:nil.
+ self classNameList value:newNameList.
+ ] ensure:[
+ listView action:sav.
+ self selectedClassNameIndices addDependent:self.
+ listView scrollWhenUpdating:prevMode.
+ ].
+ ]
].
"Modified: / 31.10.2001 / 11:33:21 / cg"
@@ -1654,5 +1656,5 @@
!ClassList class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/Tools_ClassList.st,v 1.32 2008-03-10 17:09:30 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools_ClassList.st,v 1.33 2008-04-21 16:06:38 cg Exp $'
! !