You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by pi...@apache.org on 2019/10/21 13:02:04 UTC

[royale-asjs] branch develop updated: Mx TabNavigator: It's selectedIndex should be setup along his tabbar to the same state initially

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

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


The following commit(s) were added to refs/heads/develop by this push:
     new 89e1c14  Mx TabNavigator: It's selectedIndex should be setup along his tabbar to the same state initially
89e1c14 is described below

commit 89e1c14951794775ef5f90202bf858c87d96687b
Author: Piotr Zarzycki <pi...@gmail.com>
AuthorDate: Mon Oct 21 15:01:09 2019 +0200

    Mx TabNavigator: It's selectedIndex should be setup along his tabbar to the same state initially
    
    (reference #479 )
---
 .../src/main/royale/mx/containers/beads/TabNavigatorView.as        | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/containers/beads/TabNavigatorView.as b/frameworks/projects/MXRoyale/src/main/royale/mx/containers/beads/TabNavigatorView.as
index e54056a..c924f55 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/containers/beads/TabNavigatorView.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/containers/beads/TabNavigatorView.as
@@ -167,7 +167,14 @@ public class TabNavigatorView extends GroupView
         }
         (tabBar as TabBar).dataProvider = tabDP;
         if ((tabBar.model as ISelectionModel).selectedIndex == -1)
+        {
             (tabBar.model as ISelectionModel).selectedIndex = 0;
+            var tabNavigator:TabNavigator = _strand as TabNavigator;
+            if (tabNavigator)
+            {
+                tabNavigator.selectedIndex = 0;
+            }
+        }
     }
     
     private var _panelLayoutProxy:PanelLayoutProxy;