diff --git a/src/framework/ui/tests/navigationcontroller_tests.cpp b/src/framework/ui/tests/navigationcontroller_tests.cpp index 41f08414ca7cf..30b04d571dd60 100644 --- a/src/framework/ui/tests/navigationcontroller_tests.cpp +++ b/src/framework/ui/tests/navigationcontroller_tests.cpp @@ -117,7 +117,10 @@ class Ui_NavigationControllerTests : public ::testing::Test Control* make_control(INavigation::Index& idx) { Control* c = new Control(); + NavigationControl* navCtrl = new NavigationControl(); + navCtrl->navigationController.set(m_controller); + navCtrl->setRow(idx.row); navCtrl->setColumn(idx.column); navCtrl->setOrder(idx.order()); @@ -126,8 +129,6 @@ class Ui_NavigationControllerTests : public ::testing::Test setComponentWindow(navCtrl, &m_window); - navCtrl->navigationController.set(m_controller); - c->control = navCtrl; return c; @@ -138,6 +139,7 @@ class Ui_NavigationControllerTests : public ::testing::Test Panel* p = new Panel(); NavigationPanel* navPanel = new NavigationPanel(); + navPanel->navigationController.set(m_controller); for (size_t ci = 0; ci < controlsCount; ++ci) { INavigation::Index& idx = make_idx(); @@ -162,8 +164,6 @@ class Ui_NavigationControllerTests : public ::testing::Test setComponentWindow(navPanel, &m_window); - navPanel->navigationController.set(m_controller); - p->panel = navPanel; return p; @@ -174,6 +174,8 @@ class Ui_NavigationControllerTests : public ::testing::Test Section* s = new Section(); NavigationSection* navSection = new NavigationSection(); + navSection->application.set(m_applicationMock); + navSection->navigationController.set(m_controller); for (size_t pi = 0; pi < panelsCount; ++pi) { Panel* p = make_panel(static_cast(pi), controlsCount); @@ -195,9 +197,6 @@ class Ui_NavigationControllerTests : public ::testing::Test navSection->setOrder(idx.order()); setComponentWindow(navSection, &m_window); - navSection->application.set(m_applicationMock); - - navSection->navigationController.set(m_controller); s->section = navSection; diff --git a/src/framework/ui/view/navigationcontrol.cpp b/src/framework/ui/view/navigationcontrol.cpp index f905f557e6674..4fe0b80f76caa 100644 --- a/src/framework/ui/view/navigationcontrol.cpp +++ b/src/framework/ui/view/navigationcontrol.cpp @@ -166,7 +166,7 @@ void NavigationControl::setPanel(NavigationPanel* panel) connect(m_panel, &NavigationPanel::destroyed, this, &NavigationControl::onPanelDestroyed); if (!isComponentCompleted()) { - AbstractNavigation::componentComplete(); + componentComplete(); } }