aboutsummaryrefslogtreecommitdiffstats
path: root/qt-mobile/qml/main.qml
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2016-01-22 22:02:28 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-01-24 21:28:58 -0800
commitbe303c0b5be59b2170a487348273c23c35016c11 (patch)
treed2aa242e1c5e7c39a64b626fd3eab7254b27372c /qt-mobile/qml/main.qml
parent9eea5a42944e1e7a51ce66ed06f960c0049238b7 (diff)
downloadsubsurface-be303c0b5be59b2170a487348273c23c35016c11.tar.gz
Return to divelist even from "further away"
If one browses the application more than one step (e.g. details, gps fix list and preferences), we need to pop the stack a bit more to get back to the dive list. This will clear the whole stackView as I saw no harm in discarding the history when one jumps back to the dive list. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-mobile/qml/main.qml')
-rw-r--r--qt-mobile/qml/main.qml4
1 files changed, 3 insertions, 1 deletions
diff --git a/qt-mobile/qml/main.qml b/qt-mobile/qml/main.qml
index e571fc56b..bbc72f3ec 100644
--- a/qt-mobile/qml/main.qml
+++ b/qt-mobile/qml/main.qml
@@ -41,7 +41,9 @@ MobileComponents.ApplicationWindow {
Action {
text: "Back to Divelist"
onTriggered: {
- stackView.pop()
+ for (var i=stackView.depth; i>1; i--) {
+ stackView.pop()
+ }
}
},
MobileComponents.ActionGroup {