You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by gr...@apache.org on 2021/12/16 00:06:39 UTC

[royale-asjs] 03/03: fix - Viewstack does not display the first child when starting up

This is an automated email from the ASF dual-hosted git repository.

gregdove pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit ecbcdc6e60b4d009a704db0c2f089d0e44355229
Author: greg-dove <gr...@gmail.com>
AuthorDate: Thu Dec 16 13:06:23 2021 +1300

    fix - Viewstack does not display the first child when starting up
---
 frameworks/projects/MXRoyale/src/main/royale/mx/containers/ViewStack.as | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/containers/ViewStack.as b/frameworks/projects/MXRoyale/src/main/royale/mx/containers/ViewStack.as
index de038dd..1a3ba4e 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/containers/ViewStack.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/containers/ViewStack.as
@@ -971,7 +971,7 @@ public class ViewStack extends Container implements /*IHistoryManagerClient,*/ I
         var top:Number = contentY;
 
         // Stretch the selectedIndex to fill our size
-        if (selectedIndex != -1)
+        if (nChildren && selectedIndex != -1)
         {
             var child:UIComponent =
                 UIComponent(getChildAt(selectedIndex));