Issue with Slider range modification

Hi,

When updating the range of a slider, it update its text with the current value.
Except that usually the current value is not the right one as the range is not yet correct.

I’m not sure the slider should refresh its text when updating the range as it should be be done explicetly by setting, eventually, the same value.
Otherwise it can be in a non valid state especially for ValueToText func formatter that can used and out of range value.

Thought ?

Thanks !

Could you provide some code to demonstrate this issue?

Thanks

It’s been a while, as far a I remember you just create a slider with a range of 0…1 and set the value to 0.5 then set the range to 1…4
The text is updated but not the internal hence you get a callback but with a faulty in it until you have set the value to the correct.
It’s the chicken/egg problem as you cannot set the value before setting the range, hence there is a lag for the value to be update after you have you have update the range.

This looks like is has been fixed since. The value is clamped to the new range when it is set.

perfect then.
The post was from august 2018 :smiley: