mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +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() {
|
function showMap() {
|
||||||
if (globalDrawer.drawerOpen)
|
if (globalDrawer.drawerOpen)
|
||||||
globalDrawer.close()
|
globalDrawer.close()
|
||||||
pageStack.push(mapPage)
|
var i=pageIndex(mapPage)
|
||||||
|
if (i === -1)
|
||||||
|
pageStack.push(mapPage)
|
||||||
|
else
|
||||||
|
pageStack.currentIndex = i
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function pageIndex(pageToFind) {
|
function pageIndex(pageToFind) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue