diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2010-11-03 15:17:33 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2010-11-03 15:19:08 +0100 |
commit | 61921b8f179c6d218ad4b1705a3bd68944739ee4 (patch) | |
tree | c550c8fc08a6a045142be9a918fb6b923b594db8 /vcl/unx/kde4/KDESalGraphics.cxx | |
parent | 0d78724de56a9dc011778e98f7c45f6b3d235133 (diff) |
use sane scrollbar sizes when drawing
bnc#619772 leads to a crash because maximum = minimum = 0, and this
strange (but for whatever reason needed) '- mnVisibleSize' hack
makes maximum be -1, eventually leading to a crash
Diffstat (limited to 'vcl/unx/kde4/KDESalGraphics.cxx')
-rw-r--r-- | vcl/unx/kde4/KDESalGraphics.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx index e130afbecd15..936167f8c879 100644 --- a/vcl/unx/kde4/KDESalGraphics.cxx +++ b/vcl/unx/kde4/KDESalGraphics.cxx @@ -441,6 +441,7 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part, //setup parameters from the OO values option.minimum = sbVal->mnMin; option.maximum = sbVal->mnMax - sbVal->mnVisibleSize; + option.maximum = qMax( option.maximum, option.minimum ); // bnc#619772 option.sliderValue = sbVal->mnCur; option.sliderPosition = sbVal->mnCur; option.pageStep = sbVal->mnVisibleSize; |