[PATCH] Return to divelist even from "further away"

Miika Turkia miika.turkia at gmail.com
Fri Jan 22 12:02:28 PST 2016


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 at gmail.com>
---
 qt-mobile/qml/main.qml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/qt-mobile/qml/main.qml b/qt-mobile/qml/main.qml
index e571fc5..bbc72f3 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 {
-- 
2.5.0



More information about the subsurface mailing list