[vlc-commits] Qt: do not block the spinbox if preference range is too big
Jean-Baptiste Kempf
git at videolan.org
Wed Apr 11 19:12:25 CEST 2012
vlc/vlc-2.0 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Apr 11 18:39:44 2012 +0200| [824abeccb5ae5e8201d9c6aa80b644296f399892] | 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
(cherry picked from commit 5deeed2ecd91ca2634fa2e657a8a887e274c226d)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=824abeccb5ae5e8201d9c6aa80b644296f399892
---
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 4706bf6..c311afc 100644
--- a/modules/gui/qt4/components/preferences_widgets.cpp
+++ b/modules/gui/qt4/components/preferences_widgets.cpp
@@ -937,8 +937,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(
@@ -949,8 +949,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