From a65ec772636e17c147c190f84872310d1deea067 Mon Sep 17 00:00:00 2001 From: jan Iversen Date: Thu, 30 Jan 2020 09:42:55 +0100 Subject: 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 --- mobile-widgets/qml/DiveSummary.qml | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'mobile-widgets') 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 -- cgit v1.2.3-70-g09d2