# HG changeset patch # User Claus Gittinger # Date 1330941844 -3600 # Node ID 491ac5f4cbca60ad3e4e7691a48c3ed7ca577fc6 # Parent 911eaee39d50be9ea95fb149a67d25c33f16c96c changed: #updateList try to keep the selection, when changing classes (especially: when navigating along the hierarchy) diff -r 911eaee39d50 -r 491ac5f4cbca Tools__VariableList.st --- 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 " + "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 $' ! !