fix(ui): In SParameters, when its values is updated dynamically, the minimum/maximum values displayed for a NonLinearSlider is wrong
Description
When enum values are updated dynamically, the SParameters will ask the slider about its minimum and its maximum to display it as label in the left and the right of the slider. The NonLinearSlider is actually a wrapper around a regular QSlider and which transforms its output via the values in an array.
SParameters should get the minimum and maximum of the NonLinearSlider, but it seems it gets them from the regular QSlider, as a result the minimum/maximum displayed is 0 (as arrays are 0-indexed) and the number of values in the array.
Steps to reproduce
Launch an application that uses NonLinearSlider dynamically updated.
Functional specifications
The minimum/maximum values displayed for a NonLinearSlider is always correct, even in the case of a dynamic update.
Technical specifications
NonLinearSlider re-sends the signal rangeChanged
sent by its internal slider without changing any value, as such, it is the actual range of the internal slider which is used by SParameters. The solution is to not re-sends the signal from the internal slider, but instead to send this signal when NonLinearSlider::setValues
are set and with the values of the front and the back of the array of values.
Test plan
ExSParameters will be slightly modified to allow to dynamically update the enum parameters, which will allow both manual and automated GUI testing.