Tools__ViewTreeApplication.st
changeset 3568 5004640f2a10
parent 3551 94a23bbd725b
child 3573 fc569c283368
     1.1 --- a/Tools__ViewTreeApplication.st	Fri Jun 15 02:40:48 2018 +0200
     1.2 +++ b/Tools__ViewTreeApplication.st	Fri Jun 29 09:54:19 2018 +0200
     1.3 @@ -1,3 +1,5 @@
     1.4 +"{ Encoding: utf8 }"
     1.5 +
     1.6  "
     1.7   COPYRIGHT (c) 2007 by eXept Software AG
     1.8  	      All Rights Reserved
     1.9 @@ -4364,51 +4366,53 @@
    1.10  !ViewTreeInspectorApplication::ViewTreeModel methodsFor:'selection protocol'!
    1.11  
    1.12  changed:aParameter with:oldSelection
    1.13 -    "update the visibility staus of the current selection
    1.14 +    "update the visibility status of the current selection
    1.15      "
    1.16      |unselected rootView rootItem selSize|
    1.17  
    1.18      selSize := selection size.
    1.19  
    1.20      selSize == 0 ifTrue:[
    1.21 -	selectedSuperItems := #().
    1.22 +        selectedSuperItems := #().
    1.23      ] ifFalse:[
    1.24 -	selSize == 1 ifTrue:[
    1.25 -	    selectedSuperItems := Array with:(selection at:1).
    1.26 -	] ifFalse:[
    1.27 -	    rootItem := listOfItems root.
    1.28 -
    1.29 -	    (selection includesIdentical:rootItem) ifTrue:[
    1.30 -		selectedSuperItems := Array with:rootItem.
    1.31 -	    ] ifFalse:[
    1.32 -		selectedSuperItems := OrderedCollection new:selSize.
    1.33 -
    1.34 -		selection do:[:anItem|
    1.35 -		    anItem parentsDetect:[:el| selection includesIdentical:el ]
    1.36 -				  ifNone:[ selectedSuperItems add:anItem ].
    1.37 -		].
    1.38 -	    ]
    1.39 -	]
    1.40 +        selSize == 1 ifTrue:[
    1.41 +            selectedSuperItems := Array with:(selection at:1).
    1.42 +        ] ifFalse:[
    1.43 +            rootItem := listOfItems root.
    1.44 +
    1.45 +            (selection includesIdentical:rootItem) ifTrue:[
    1.46 +                selectedSuperItems := Array with:rootItem.
    1.47 +            ] ifFalse:[
    1.48 +                selectedSuperItems := OrderedCollection new:selSize.
    1.49 +
    1.50 +                selection do:[:anItem|
    1.51 +                    anItem parentsDetect:[:el| selection includesIdentical:el ]
    1.52 +                                  ifNone:[ selectedSuperItems add:anItem ].
    1.53 +                ].
    1.54 +            ]
    1.55 +        ]
    1.56      ].
    1.57  
    1.58      (     hiddenLevel == 0
    1.59       and:[(rootView := listOfItems rootView) notNil
    1.60       and:[rootView shown]]
    1.61      ) ifTrue:[
    1.62 -	selSize == 0 ifTrue:[
    1.63 -	    "/ must redraw the old selection unselected
    1.64 -	    self redrawUnselected:oldSelection andLock:false
    1.65 -	] ifFalse:[
    1.66 -	    self invalidateSelection.
    1.67 -
    1.68 -	    oldSelection size ~~ 0 ifTrue:[
    1.69 -		"/ must redraw all elements no longer in the selection
    1.70 -		unselected := oldSelection select:[:el| (selection includesIdentical:el) not ].
    1.71 -		self redrawUnselected:unselected andLock:false.
    1.72 -	    ]
    1.73 -	]
    1.74 +        selSize == 0 ifTrue:[
    1.75 +            "/ must redraw the old selection unselected
    1.76 +            self redrawUnselected:oldSelection andLock:false
    1.77 +        ] ifFalse:[
    1.78 +            self invalidateSelection.
    1.79 +
    1.80 +            oldSelection size ~~ 0 ifTrue:[
    1.81 +                "/ must redraw all elements no longer in the selection
    1.82 +                unselected := oldSelection select:[:el| (selection includesIdentical:el) not ].
    1.83 +                self redrawUnselected:unselected andLock:false.
    1.84 +            ]
    1.85 +        ]
    1.86      ].
    1.87      super changed:aParameter with:oldSelection.
    1.88 +
    1.89 +    "Modified (comment): / 29-06-2018 / 08:25:36 / Claus Gittinger"
    1.90  !
    1.91  
    1.92  setValue:aNewSelection