Commit 824abecc authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: do not block the spinbox if preference range is too big

However, we still cannot select the full scale.

Close #6603 and #6602
(cherry picked from commit 5deeed2e)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 53070d79
...@@ -937,8 +937,8 @@ IntegerRangeConfigControl::IntegerRangeConfigControl( vlc_object_t *_p_this, ...@@ -937,8 +937,8 @@ IntegerRangeConfigControl::IntegerRangeConfigControl( vlc_object_t *_p_this,
void IntegerRangeConfigControl::finish() void IntegerRangeConfigControl::finish()
{ {
spin->setMaximum( p_item->max.i ); spin->setMaximum( p_item->max.i > INT_MAX ? INT_MAX : p_item->max.i );
spin->setMinimum( p_item->min.i ); spin->setMinimum( p_item->min.i < INT_MIN ? INT_MIN : p_item->min.i );
} }
IntegerRangeSliderConfigControl::IntegerRangeSliderConfigControl( IntegerRangeSliderConfigControl::IntegerRangeSliderConfigControl(
...@@ -949,8 +949,8 @@ IntegerRangeSliderConfigControl::IntegerRangeSliderConfigControl( ...@@ -949,8 +949,8 @@ IntegerRangeSliderConfigControl::IntegerRangeSliderConfigControl(
{ {
slider = _slider; slider = _slider;
label = _label; label = _label;
slider->setMaximum( p_item->max.i ); slider->setMaximum( p_item->max.i > INT_MAX ? INT_MAX : p_item->max.i );
slider->setMinimum( p_item->min.i ); slider->setMinimum( p_item->min.i < INT_MIN ? INT_MIN : p_item->min.i );
slider->setValue( p_item->value.i ); slider->setValue( p_item->value.i );
if( p_item->psz_longtext ) if( p_item->psz_longtext )
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment