mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
69272eefa8
commit
f2a48e813f
2 changed files with 17 additions and 20 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue