mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Mobile: move pageIndex function to main.qml
This way it can be more easily called from other pages. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
2ef401ef5f
commit
2f0689d3b8
2 changed files with 9 additions and 9 deletions
|
@ -90,6 +90,14 @@ Kirigami.ApplicationWindow {
|
|||
pageStack.push(mapPage)
|
||||
}
|
||||
|
||||
function pageIndex(pageToFind) {
|
||||
for (var i = 0; i < pageStack.contentItem.contentChildren.length; i++) {
|
||||
if (pageStack.contentItem.contentChildren[i] === pageToFind)
|
||||
return i
|
||||
}
|
||||
return -1
|
||||
}
|
||||
|
||||
function startAddDive() {
|
||||
detailsWindow.state = "add"
|
||||
detailsWindow.dive_id = manager.addDive();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue