mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
QML UI: don't show bogus warning if page stack is reset
As we clear all the pages from the stack, we can briefly have no valid currentItem. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
ae6756e7f1
commit
f8d551ac6e
1 changed files with 13 additions and 9 deletions
|
@ -546,6 +546,9 @@ if you have network connectivity and want to sync your data to cloud storage."),
|
||||||
// This is called whenever the user navigates using the breadcrumbs in the header
|
// This is called whenever the user navigates using the breadcrumbs in the header
|
||||||
|
|
||||||
// disable the left swipe to go back when on the map page
|
// disable the left swipe to go back when on the map page
|
||||||
|
if (pageStack.currentItem === null) {
|
||||||
|
console.log("there's no current page")
|
||||||
|
} else {
|
||||||
stackView.interactive = pageStack.currentItem.objectName !== mapPage.objectName
|
stackView.interactive = pageStack.currentItem.objectName !== mapPage.objectName
|
||||||
|
|
||||||
// is there a better way to reload the map markers instead of doing that
|
// is there a better way to reload the map markers instead of doing that
|
||||||
|
@ -560,6 +563,7 @@ if you have network connectivity and want to sync your data to cloud storage."),
|
||||||
detailsWindow.endEditMode()
|
detailsWindow.endEditMode()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
QMLPrefs {
|
QMLPrefs {
|
||||||
id: prefs
|
id: prefs
|
||||||
|
|
Loading…
Add table
Reference in a new issue