PanelView.st
changeset 6719 71423e2b6206
parent 6591 6814850d2fea
child 6723 505155166c8e
--- a/PanelView.st	Thu Oct 24 17:38:06 2019 +0200
+++ b/PanelView.st	Thu Oct 24 17:39:50 2019 +0200
@@ -327,6 +327,9 @@
 
     super addSubView:aView.
     self addedView:aView
+
+    "Modified: / 24-10-2019 / 15:50:12 / Stefan Vogel"
+    "Modified (comment): / 24-10-2019 / 17:39:25 / Stefan Vogel"
 !
 
 addSubView:newView after:aViewOrNil
@@ -669,21 +672,20 @@
     |subViews|
 
     subViews := self subViews.
-    ignoreInvisibleComponents ifTrue:[
-        subViews size ~~ 0 ifTrue:[
-            subViews := subViews 
-                            select:[:v | 
-                                    "/ if I am already realized, only consider realized subViews
-                                    "/ otherwise, consider subViews which will be shown when I am.
-                                    realized 
-                                        ifTrue:[v realized]       
-                                        ifFalse:[v isHiddenOnRealize not]
-                                   ].
-        ].
+    (ignoreInvisibleComponents and:[subViews notEmptyOrNil]) ifTrue:[
+        subViews := subViews 
+                        select:[:v | 
+                                "/ if I am already realized, only consider realized subViews
+                                "/ otherwise, consider subViews which will be shown when I am.
+                                realized 
+                                    ifTrue:[v realized]       
+                                    ifFalse:[v isHiddenOnRealize not]
+                               ].
     ].
     ^ subViews
 
-    "Created: / 17.1.1998 / 00:17:05 / cg"
+    "Created: / 17-01-1998 / 00:17:05 / cg"
+    "Modified: / 24-10-2019 / 15:57:35 / Stefan Vogel"
 ! !
 
 !PanelView methodsFor:'queries'!