diff --git a/src/main/haxework/view/frame/FrameSwitcher.hx b/src/main/haxework/view/frame/FrameSwitcher.hx index 9b5de2b..a673f20 100755 --- a/src/main/haxework/view/frame/FrameSwitcher.hx +++ b/src/main/haxework/view/frame/FrameSwitcher.hx @@ -57,11 +57,6 @@ class FrameSwitcher extends GroupView { if (current == null) { throw 'frame "$id" not found'; } - addView(current); - toUpdate(); - update(); - focus(current); - current.onShow(data); if (animate != null) { animate.cancel(); } @@ -71,6 +66,11 @@ class FrameSwitcher extends GroupView { } else { removePrev(prev); } + addView(current); + toUpdate(); + update(); + focus(current); + current.onShow(data); history.push({id:current.frameId, data:data}); onSwitch.emit(current); return cast current;