diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2019-10-22 16:21:15 -0400 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-10-26 11:38:26 -0700 |
commit | f69b93de40949294e967702f45e818c50d3db0b9 (patch) | |
tree | 19ff203c7f5945b322c2d26052984552231b6119 | |
parent | 4e583f91206a7f62c73bed58a338ebc28620774c (diff) | |
download | subsurface-f69b93de40949294e967702f45e818c50d3db0b9.tar.gz |
Mobile: don't push map page if it's already on the stack
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | mobile-widgets/qml/main.qml | 7 |
1 files changed, 6 insertions, 1 deletions
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) { |