[vlc-commits] Qt: do not block the spinbox if preference range is too big
Jean-Baptiste Kempf
git at videolan.org
Wed Apr 11 18:41:00 CEST 2012
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Apr 11 18:39:44 2012 +0200| [5deeed2ecd91ca2634fa2e657a8a887e274c226d] | committer: 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
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5deeed2ecd91ca2634fa2e657a8a887e274c226d
---
modules/gui/qt4/components/preferences_widgets.cpp | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/gui/qt4/components/preferences_widgets.cpp b/modules/gui/qt4/components/preferences_widgets.cpp
index 61c9cf4..a098be2 100644
--- a/modules/gui/qt4/components/preferences_widgets.cpp
+++ b/modules/gui/qt4/components/preferences_widgets.cpp
@@ -879,8 +879,8 @@ IntegerRangeConfigControl::IntegerRangeConfigControl( vlc_object_t *_p_this,
void IntegerRangeConfigControl::finish()
{
- spin->setMaximum( p_item->max.i );
- spin->setMinimum( p_item->min.i );
+ spin->setMaximum( p_item->max.i > INT_MAX ? INT_MAX : p_item->max.i );
+ spin->setMinimum( p_item->min.i < INT_MIN ? INT_MIN : p_item->min.i );
}
IntegerRangeSliderConfigControl::IntegerRangeSliderConfigControl(
@@ -891,8 +891,8 @@ IntegerRangeSliderConfigControl::IntegerRangeSliderConfigControl(
{
slider = _slider;
label = _label;
- slider->setMaximum( p_item->max.i );
- slider->setMinimum( p_item->min.i );
+ slider->setMaximum( p_item->max.i > INT_MAX ? INT_MAX : p_item->max.i );
+ slider->setMinimum( p_item->min.i < INT_MIN ? INT_MIN : p_item->min.i );
slider->setValue( p_item->value.i );
if( p_item->psz_longtext )
{
More information about the vlc-commits
mailing list