summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml/DiveList.qml
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2020-03-25 20:29:05 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-03-26 11:49:05 -0700
commitf2a48e813f6967bd6b02f5e7f92d82534b175959 (patch)
tree72da1ea4388d0901444ceb616c649ff26d8e1297 /mobile-widgets/qml/DiveList.qml
parent69272eefa82493db2993d90cf82884dd5ee46ee2 (diff)
downloadsubsurface-f2a48e813f6967bd6b02f5e7f92d82534b175959.tar.gz
mobile/page-selection: consistently use showPage to select a page
We still used pageStack.push() all over the place. Also, in showPage, disable the map hack if the user actively picks a different page. This should fix an issue where the user picked the map and then tried to add a dive to the dive list - and instead of the dive edit was shown the map again. Reported-by: Hartley Horwitz <hhrwtz@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qml/DiveList.qml')
-rw-r--r--mobile-widgets/qml/DiveList.qml9
1 files changed, 2 insertions, 7 deletions
diff --git a/mobile-widgets/qml/DiveList.qml b/mobile-widgets/qml/DiveList.qml
index 383e1f930..cda60bf59 100644
--- a/mobile-widgets/qml/DiveList.qml
+++ b/mobile-widgets/qml/DiveList.qml
@@ -65,12 +65,7 @@ Kirigami.ScrollablePage {
manager.appendTextToLog("clicked on dive")
if (detailsWindow.state === "view") {
manager.selectRow(model.row);
- // switch to detailsWindow (or push it if it's not in the stack)
- var i = rootItem.pageIndex(detailsWindow)
- if (i === -1)
- pageStack.push(detailsWindow)
- else
- pageStack.currentIndex = i
+ showPage(detailsWindow)
}
}
}
@@ -305,7 +300,7 @@ Kirigami.ScrollablePage {
tripEditWindow.tripId = currentItem.myData.tripId
tripEditWindow.tripLocation = currentItem.myData.tripLocation
tripEditWindow.tripNotes = currentItem.myData.tripNotes
- pageStack.push(tripEditWindow)
+ showPage(tripEditWindow)
}
}