[escher] Clean stack view controller

Change-Id: I922ed49353b98b7e763c7b6fefd43ed214a6a794
This commit is contained in:
Émilie Feral
2017-04-20 17:55:07 +02:00
parent 998b6c7d1e
commit 7b9e199d44
4 changed files with 70 additions and 53 deletions

View File

@@ -113,8 +113,8 @@ void TabViewController::setActiveTab(int8_t i, bool forceReactive) {
assert(i <= m_numberOfChildren);
if (i != m_activeChildIndex) {
activeVC->loadView();
m_view.setActiveView(activeVC->view());
}
m_view.setActiveView(activeVC->view());
m_view.m_tabView.setActiveIndex(i);
if (m_activeChildIndex >= 0 && m_activeChildIndex != i) {
m_children[m_activeChildIndex]->viewDidDisappear();
@@ -179,6 +179,7 @@ void TabViewController::loadView() {
m_activeChildIndex = 0;
}
m_children[m_activeChildIndex]->loadView();
m_view.setActiveView(m_children[m_activeChildIndex]->view());
}
void TabViewController::unloadView() {