EffectComposer: Fix slider value precision

Effects with slider controlled real values now properly cut the values
to two decimals.

Fixes: QDS-11773
Change-Id: I056a295e5a126536d3003490c938361e4ce382b3
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
Miikka Heikkinen
2024-05-03 15:47:52 +03:00
parent 3f48d2bb7e
commit df20f8924a

View File

@@ -42,8 +42,9 @@ Row {
to: uniformMaxValue
value: uniformValue
onMoved: {
uniformValue = value
spinBox.value = value // binding isn't working for this property so update it
let fixedValue = Number.parseFloat(value).toFixed(slider.decimals)
uniformValue = fixedValue
spinBox.value = fixedValue // binding isn't working for this property so update it
}
}
}