You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by pe...@apache.org on 2016/09/22 21:08:47 UTC
[3/4] git commit: [flex-asjs] [refs/heads/develop] - Fix for
StackedViewManager in Mobile project.
Fix for StackedViewManager in Mobile project.
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/b0f8b6d1
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/b0f8b6d1
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/b0f8b6d1
Branch: refs/heads/develop
Commit: b0f8b6d17356fa305a8b7ac8146e4e2c842cb3c9
Parents: e0ac88c
Author: Peter Ent <pe...@apache.org>
Authored: Wed Sep 21 16:50:13 2016 -0400
Committer: Peter Ent <pe...@apache.org>
Committed: Wed Sep 21 16:50:13 2016 -0400
----------------------------------------------------------------------
.../org/apache/flex/mobile/StackedViewManager.as | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b0f8b6d1/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/StackedViewManager.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/StackedViewManager.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/StackedViewManager.as
index ffa26c5..6720d1a 100644
--- a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/StackedViewManager.as
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/StackedViewManager.as
@@ -20,8 +20,8 @@ package org.apache.flex.mobile
{
import org.apache.flex.events.Event;
import org.apache.flex.html.Container;
- import org.apache.flex.mobile.IViewManagerView;
import org.apache.flex.mobile.IViewManager;
+ import org.apache.flex.mobile.IViewManagerView;
import org.apache.flex.mobile.chrome.NavigationBar;
import org.apache.flex.mobile.chrome.ToolBar;
import org.apache.flex.mobile.models.ViewManagerModel;
@@ -102,6 +102,15 @@ package org.apache.flex.mobile
private var _topView:IViewManagerView;
+
+ override public function set views(value:Array):void
+ {
+ super.views = value;
+
+ if (value != null && value.length > 0) {
+ _topView = value[0] as IViewManagerView;
+ }
+ }
/**
* The top-most (current) view.
@@ -130,7 +139,9 @@ package org.apache.flex.mobile
nextView.viewManager = this;
ViewManagerModel(model).pushView(nextView);
- removeElement(_topView);
+ if (_topView != null) {
+ removeElement(_topView);
+ }
_topView = nextView;
addElement(_topView);