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
|
to: uniformMaxValue
|
||||||
value: uniformValue
|
value: uniformValue
|
||||||
onMoved: {
|
onMoved: {
|
||||||
uniformValue = value
|
let fixedValue = Number.parseFloat(value).toFixed(slider.decimals)
|
||||||
spinBox.value = value // binding isn't working for this property so update it
|
uniformValue = fixedValue
|
||||||
|
spinBox.value = fixedValue // binding isn't working for this property so update it
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user