From 5a36e32fb6449bf6a282120f2443744ae1f3f8ce Mon Sep 17 00:00:00 2001 From: Elias Steurer Date: Sat, 28 Nov 2020 13:56:51 +0100 Subject: [PATCH] Fix navigation item on open from hidden --- ScreenPlay/main.qml | 1 + ScreenPlay/qml/Navigation/Navigation.qml | 21 ++++++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/ScreenPlay/main.qml b/ScreenPlay/main.qml index 41de6367..f6d4f829 100644 --- a/ScreenPlay/main.qml +++ b/ScreenPlay/main.qml @@ -30,6 +30,7 @@ ApplicationWindow { onVisibilityChanged: { if (window.visibility === 2) { switchPage("Installed") + nav.setNavigation("Installed") } } diff --git a/ScreenPlay/qml/Navigation/Navigation.qml b/ScreenPlay/qml/Navigation/Navigation.qml index 814e0f36..63a40684 100644 --- a/ScreenPlay/qml/Navigation/Navigation.qml +++ b/ScreenPlay/qml/Navigation/Navigation.qml @@ -46,15 +46,7 @@ Rectangle { } } - function onPageChanged(name) { - - ScreenPlay.setTrackerSendEvent("navigation", name) - - if (!navActive) - return - - navigation.changePage(name) - + function setNavigation(name){ var i = 0 for (; i < navArray.length; i++) { if (navArray[i].name === name) @@ -65,6 +57,17 @@ Rectangle { } } + function onPageChanged(name) { + + ScreenPlay.setTrackerSendEvent("navigation", name) + + if (!navActive) + return + + navigation.changePage(name) + setNavigation(name) + } + Row { id: row anchors.fill: parent