Index: sources/gui/qml/components/SliderCreateTreatment.qml =================================================================== diff -u -rfcfa029b4a6d30ff8aa8162de7573545f3cf7052 -re5ae6f8513673d1c09bd04ec3da08e71bfded5e2 --- sources/gui/qml/components/SliderCreateTreatment.qml (.../SliderCreateTreatment.qml) (revision fcfa029b4a6d30ff8aa8162de7573545f3cf7052) +++ sources/gui/qml/components/SliderCreateTreatment.qml (.../SliderCreateTreatment.qml) (revision e5ae6f8513673d1c09bd04ec3da08e71bfded5e2) @@ -54,6 +54,19 @@ anchors.horizontalCenter: parent.horizontalCenter + function resetParameter() { + _slider.reset(defaultValue) + _root.active = false + } + + function prepopulate(vNewValue) { + // Due to how the slider behaves, the ordering of setting it active first before + // setting the value is important. If we set the activeness after the value, the + // value gets set incorrectly due to the onActiveChanged handling + setActiveValid() + _slider.reset(vNewValue) + } + function reset(vValue) { _slider.reset(vValue) }