summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml/DiveSummary.qml
diff options
context:
space:
mode:
authorGravatar jan Iversen <jan@casacondor.com>2020-01-30 09:42:55 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-01-30 19:51:50 +0200
commita65ec772636e17c147c190f84872310d1deea067 (patch)
tree20f8667b61bed147208f08ef0df829cf6d539fe3 /mobile-widgets/qml/DiveSummary.qml
parent636af4089722e005da5fbd45fdf704a1e474dff2 (diff)
downloadsubsurface-a65ec772636e17c147c190f84872310d1deea067.tar.gz
mobile-widgets/qml/divesummary.qml: detect change in units
When either length or volume unit is changed, the text needs to be changed. Let signal lengthChanged and volumeChanged cause a recalcation and therefore new text. Signed-off-by: jan Iversen <jan@casacondor.com>
Diffstat (limited to 'mobile-widgets/qml/DiveSummary.qml')
-rw-r--r--mobile-widgets/qml/DiveSummary.qml10
1 files changed, 10 insertions, 0 deletions
diff --git a/mobile-widgets/qml/DiveSummary.qml b/mobile-widgets/qml/DiveSummary.qml
index d55443815..ad6d30372 100644
--- a/mobile-widgets/qml/DiveSummary.qml
+++ b/mobile-widgets/qml/DiveSummary.qml
@@ -15,6 +15,16 @@ Kirigami.ScrollablePage {
if (visible)
Backend.summaryCalculation(selectionPrimary.currentIndex, selectionSecondary.currentIndex)
}
+ Connections {
+ target: Backend
+ onLengthChanged: {
+ Backend.summaryCalculation(selectionPrimary.currentIndex, selectionSecondary.currentIndex)
+ }
+ onVolumeChanged: {
+ Backend.summaryCalculation(selectionPrimary.currentIndex, selectionSecondary.currentIndex)
+ }
+ }
+
GridLayout {
columns: 3