aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-02-05 08:29:05 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-02-08 10:29:36 -0800
commit48ccd114fcb5e1ca0a692c096143c2f24d8254d3 (patch)
treef95173443eb83b2f148c182e271f9e7afb353341 /mobile-widgets/qml
parentf7c73f1987a7069489d66316383b31b3248810b3 (diff)
downloadsubsurface-48ccd114fcb5e1ca0a692c096143c2f24d8254d3.tar.gz
mobile/summary: recalculate first and last dive on visibility change
Recalcluate not only the statistics for the given period, but also the global first and last dive date. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'mobile-widgets/qml')
-rw-r--r--mobile-widgets/qml/DiveSummary.qml5
1 files changed, 4 insertions, 1 deletions
diff --git a/mobile-widgets/qml/DiveSummary.qml b/mobile-widgets/qml/DiveSummary.qml
index e827d4f42..3d803074e 100644
--- a/mobile-widgets/qml/DiveSummary.qml
+++ b/mobile-widgets/qml/DiveSummary.qml
@@ -16,8 +16,11 @@ Kirigami.ScrollablePage {
title: qsTr("Dive summary")
onVisibleChanged: {
- if (visible)
+ if (visible) {
Backend.summaryCalculation(selectionPrimary.currentIndex, selectionSecondary.currentIndex)
+ firstDive = Backend.firstDiveDate()
+ lastDive = Backend.lastDiveDate()
+ }
}
Connections {
target: Backend