Index: sources/gui/qml/components/Slider.qml =================================================================== diff -u -rd949be21f2a9badd0978dddaaf436f6805de28dc -r00ed70b03062c6f4fa1bfd2e515efd777e086f85 --- sources/gui/qml/components/Slider.qml (.../Slider.qml) (revision d949be21f2a9badd0978dddaaf436f6805de28dc) +++ sources/gui/qml/components/Slider.qml (.../Slider.qml) (revision 00ed70b03062c6f4fa1bfd2e515efd777e086f85) @@ -24,7 +24,7 @@ * \brief Denali project ProgressBar */ RangeRect { id: _root - property real value : _progressRect.value + property real value : _progressRect.value property real step : 1 property bool stepSnap : false @@ -57,6 +57,14 @@ signal handleSelected() signal sliderSelected() + // this function shall be used in case that any external value is forced to be set for the slider + // like the OFF switch wants to externally set the slider value and bypass slider controlls and checks. + // same is used in the main treatment Blood,dialyzer sliders to be set to the current value when get in to adjustment screen. + function reset(vValue) { + _root.value = vValue + _progressRect.value = vValue + } + function incrementValue (vInStepSegments) { updateValue(vInStepSegments, true) } @@ -84,7 +92,7 @@ // Update the slider's visual value _progressRect.previousSliderValue = newValue // for comparison purposes - _progressRect.value = newValue // visual value + _progressRect.value = newValue // visual value // update slider value with rounded new value update(newValue) @@ -100,8 +108,6 @@ } } - onEnabledChanged: _progressRect.value = minimum // reset the visual progress bar - onIsActiveChanged: { setActiveVisuals(isActive)