diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiDoubleSliderEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiDoubleSliderEditor.cpp index 832c6857d6..5363a41d3c 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiDoubleSliderEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiDoubleSliderEditor.cpp @@ -222,7 +222,7 @@ int PdmUiDoubleSliderEditor::convertToSliderValue(double value) { double exactSliderValue = m_slider->maximum() * (value - m_attributes.m_minimum) / (m_attributes.m_maximum - m_attributes.m_minimum); - int sliderValue = static_cast(nearbyint( exactSliderValue)); + int sliderValue = static_cast( exactSliderValue + 0.5); sliderValue = qBound(m_slider->minimum(), sliderValue, m_slider->maximum()); return sliderValue;