mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Mobile: don't push map page if it's already on the stack
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
4e583f9120
commit
f69b93de40
1 changed files with 6 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue