From be303c0b5be59b2170a487348273c23c35016c11 Mon Sep 17 00:00:00 2001 From: Miika Turkia Date: Fri, 22 Jan 2016 22:02:28 +0200 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-mobile/qml/main.qml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'qt-mobile/qml/main.qml') 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 { -- cgit v1.2.3-70-g09d2