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>
This commit is contained in:
Miika Turkia 2016-01-22 22:02:28 +02:00 committed by Dirk Hohndel
parent 9eea5a4294
commit be303c0b5b

View file

@ -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 {