From 4716be01f65e3a86e4dc3ce9df0eacde5664af4c Mon Sep 17 00:00:00 2001 From: Alexander Ivash Date: Sat, 7 Jul 2018 02:26:51 +0300 Subject: [PATCH] eliminate binding loop which could lead to not updating spinbox UI --- interface/resources/qml/controls-uit/SpinBox.qml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/interface/resources/qml/controls-uit/SpinBox.qml b/interface/resources/qml/controls-uit/SpinBox.qml index 43cdf84a55..5a4ba70080 100644 --- a/interface/resources/qml/controls-uit/SpinBox.qml +++ b/interface/resources/qml/controls-uit/SpinBox.qml @@ -58,10 +58,14 @@ SpinBox { onValueModified: realValue = value/factor onValueChanged: realValue = value/factor + onRealValueChanged: { + var newValue = Math.round(realValue*factor); + if(value != newValue) { + value = newValue; + } + } stepSize: realStepSize*factor - value: Math.round(realValue*factor) - to : realTo*factor from : realFrom*factor