diff options
author | jan Iversen <jan@casacondor.com> | 2020-01-30 09:42:55 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-01-30 19:51:50 +0200 |
commit | a65ec772636e17c147c190f84872310d1deea067 (patch) | |
tree | 20f8667b61bed147208f08ef0df829cf6d539fe3 /mobile-widgets | |
parent | 636af4089722e005da5fbd45fdf704a1e474dff2 (diff) | |
download | subsurface-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')
-rw-r--r-- | mobile-widgets/qml/DiveSummary.qml | 10 |
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 |