This is an automated email from the ASF dual-hosted git repository.
aharui 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 52a44ac wait for deferred children before assigning selectedIndex.
Should fix #685
52a44ac is described below
commit 52a44ac75ecf35e5f33f2c97a638828842c99141
Author: Alex Harui <[email protected]>
AuthorDate: Thu Jan 23 11:58:47 2020 -0800
wait for deferred children before assigning selectedIndex. Should fix #685
---
.../MXRoyale/src/main/royale/mx/containers/beads/TabNavigatorView.as | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 02aae37..1201bb2 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
@@ -169,7 +169,7 @@ public class TabNavigatorView extends GroupView
child.addEventListener("labelChanged", childrenAddedHandler);
}
(tabBar as TabBar).dataProvider = tabDP;
- if ((tabBar.model as ISelectionModel).selectedIndex == -1)
+ if ((tabBar.model as ISelectionModel).selectedIndex == -1 && n > 0)
{
(tabBar.model as ISelectionModel).selectedIndex = 0;
var tabNavigator:TabNavigator = _strand as TabNavigator;