From eac5a249dc5a59c99da41c96e81de5beca24fd58 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Thu, 17 Nov 2022 17:15:40 +0100 Subject: [PATCH] Fix dial not using dynamic max value --- nymea-app/ui/components/Dial.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nymea-app/ui/components/Dial.qml b/nymea-app/ui/components/Dial.qml index 897a57f2..2736776c 100644 --- a/nymea-app/ui/components/Dial.qml +++ b/nymea-app/ui/components/Dial.qml @@ -104,7 +104,7 @@ Item { currentStep = roundToPrecision(currentValue - root.progressState.minValue) / root.precision } - print("* current step", currentStep, root.steps, currentValue) +// print("* current step", currentStep, root.steps, currentValue) for(var step = 0; step < steps; step += root.precision) { var angle = step * anglePerStep + startAngle; @@ -182,7 +182,7 @@ Item { if (Math.abs(valueDiff) > 0) { var currentValue = actionQueue.pendingValue || root.progressState.value var newValue = currentValue + valueDiff - newValue = Math.min(root.stateType.maxValue, Math.max(root.progressState.minValue, newValue)) + newValue = Math.min(root.progressState.maxValue, Math.max(root.progressState.minValue, newValue)) if (currentValue !== newValue) { actionQueue.sendValue(newValue) }