#QUALITY by exept draft
authorClaus Gittinger <cg@exept.de>
Sun, 25 Aug 2019 14:52:54 +0200
changeset 3747 92077573d5c4
parent 3746 0bfa90576a61
child 3748 aa07806d6a5a
#QUALITY by exept class: Tools::ViewTreeInspectorApplication::ViewTreeItem changed: #updateFromChildren: do not depend on return value from add:
Tools__ViewTreeApplication.st
--- a/Tools__ViewTreeApplication.st	Sun Aug 25 12:10:57 2019 +0200
+++ b/Tools__ViewTreeApplication.st	Sun Aug 25 14:52:54 2019 +0200
@@ -3303,23 +3303,23 @@
     "
 
     mergedList size == 0 ifTrue:[ ^ self removeAll ].
-    children   size == 0 ifTrue:[ ^ self addAll:mergedList ].
+    children   size == 0 ifTrue:[ self addAll:mergedList. ^mergedList ].
 
     self criticalDo:[
-	self nonCriticalDo:[:el| |wdg|
-	    wdg := el widget.
-	    mergedList detect:[:e2| e2 widget == wdg ] ifNone:[ self remove:el ].
-	].
-
-	mergedList keysAndValuesDo:[:i :el| |wdg e2|
-	    wdg := el widget.
-
-	    e2  := self at:i ifAbsent:nil.
-
-	    (e2 isNil or:[e2 widget ~~ wdg]) ifTrue:[
-		self add:el beforeIndex:i
-	    ]
-	]
+        self nonCriticalDo:[:el| |wdg|
+            wdg := el widget.
+            mergedList detect:[:e2| e2 widget == wdg ] ifNone:[ self remove:el ].
+        ].
+
+        mergedList keysAndValuesDo:[:i :el| |wdg e2|
+            wdg := el widget.
+
+            e2  := self at:i ifAbsent:nil.
+
+            (e2 isNil or:[e2 widget ~~ wdg]) ifTrue:[
+                self add:el beforeIndex:i
+            ]
+        ]
     ].
 ! !