forked from qt-creator/qt-creator
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:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user