From f69b93de40949294e967702f45e818c50d3db0b9 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 22 Oct 2019 16:21:15 -0400 Subject: Mobile: don't push map page if it's already on the stack Signed-off-by: Dirk Hohndel --- mobile-widgets/qml/main.qml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'mobile-widgets') diff --git a/mobile-widgets/qml/main.qml b/mobile-widgets/qml/main.qml index 8827651a8..c338fa04c 100644 --- a/mobile-widgets/qml/main.qml +++ b/mobile-widgets/qml/main.qml @@ -90,7 +90,12 @@ Kirigami.ApplicationWindow { function showMap() { if (globalDrawer.drawerOpen) globalDrawer.close() - pageStack.push(mapPage) + var i=pageIndex(mapPage) + if (i === -1) + pageStack.push(mapPage) + else + pageStack.currentIndex = i + } function pageIndex(pageToFind) { -- cgit v1.2.3-70-g09d2