changed: #updateList
try to keep the selection, when changing classes
(especially: when navigating along the hierarchy)
--- a/Tools__VariableList.st Mon Mar 05 11:03:15 2012 +0100
+++ b/Tools__VariableList.st Mon Mar 05 11:04:04 2012 +0100
@@ -660,20 +660,24 @@
newList ~= variableList value ifTrue:[
selectedVariablesHolder := self selectedVariableEntries.
- prevSelection := (selectedVariablesHolder value copy) ? #().
+ prevSelection := (self selectedVariables value "selectedVariablesHolder value" copy) ? #().
variableList value:newList.
- newSelection := prevSelection select:[:item | newList includes:item].
+ newSelection := newList select:[:item | prevSelection includes:item string].
+"/ newSelection := prevSelection select:[:item | newList includes:item].
newSelection size > 0 ifTrue:[
"/ force change (for dependents)
- selectedVariablesHolder value:nil.
- selectedVariablesHolder value:newSelection.
+ "/ selectedVariablesHolder value:nil.
+ selectedVariablesHolder
+ setValue:newSelection;
+ changed.
] ifFalse:[
prevSelection := selectedVariablesHolder value.
selectedVariablesHolder value:nil.
].
- (prevSelection size > 0 or:[newSelection size > 0]) ifTrue:[
+ (prevSelection size > 0 or:[newSelection size > 0
+ "and:[ prevSelection ~= newSelection]"]) ifTrue:[
self updateOutputGenerator.
].
].
@@ -687,6 +691,7 @@
listValid := true.
"Modified: / 05-08-2011 / 12:34:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 04-03-2012 / 13:29:11 / cg"
! !
!VariableList::VariableEntry class methodsFor:'instance creation'!
@@ -814,5 +819,5 @@
!VariableList class methodsFor:'documentation'!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/Tools__VariableList.st,v 1.15 2012-03-01 09:24:01 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__VariableList.st,v 1.16 2012-03-05 10:04:04 cg Exp $'
! !