diff options
Diffstat (limited to 'linden/indra/llui/llspinctrl.cpp')
-rw-r--r-- | linden/indra/llui/llspinctrl.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/linden/indra/llui/llspinctrl.cpp b/linden/indra/llui/llspinctrl.cpp index 98cdae1..9e85b20 100644 --- a/linden/indra/llui/llspinctrl.cpp +++ b/linden/indra/llui/llspinctrl.cpp | |||
@@ -52,6 +52,7 @@ | |||
52 | 52 | ||
53 | const U32 MAX_STRING_LENGTH = 32; | 53 | const U32 MAX_STRING_LENGTH = 32; |
54 | 54 | ||
55 | static LLRegisterWidget<LLSpinCtrl> r2("spinner"); | ||
55 | 56 | ||
56 | LLSpinCtrl::LLSpinCtrl( const LLString& name, const LLRect& rect, const LLString& label, const LLFontGL* font, | 57 | LLSpinCtrl::LLSpinCtrl( const LLString& name, const LLRect& rect, const LLString& label, const LLFontGL* font, |
57 | void (*commit_callback)(LLUICtrl*, void*), | 58 | void (*commit_callback)(LLUICtrl*, void*), |
@@ -409,26 +410,23 @@ void LLSpinCtrl::draw() | |||
409 | 410 | ||
410 | BOOL LLSpinCtrl::handleScrollWheel(S32 x, S32 y, S32 clicks) | 411 | BOOL LLSpinCtrl::handleScrollWheel(S32 x, S32 y, S32 clicks) |
411 | { | 412 | { |
412 | if( getEnabled() ) | 413 | if( clicks > 0 ) |
413 | { | 414 | { |
414 | if( clicks > 0 ) | 415 | while( clicks-- ) |
415 | { | 416 | { |
416 | while( clicks-- ) | 417 | LLSpinCtrl::onDownBtn(this); |
417 | { | ||
418 | LLSpinCtrl::onDownBtn(this); | ||
419 | } | ||
420 | } | ||
421 | else | ||
422 | while( clicks++ ) | ||
423 | { | ||
424 | LLSpinCtrl::onUpBtn(this); | ||
425 | } | 418 | } |
426 | } | 419 | } |
420 | else | ||
421 | while( clicks++ ) | ||
422 | { | ||
423 | LLSpinCtrl::onUpBtn(this); | ||
424 | } | ||
427 | 425 | ||
428 | return TRUE; | 426 | return TRUE; |
429 | } | 427 | } |
430 | 428 | ||
431 | BOOL LLSpinCtrl::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent) | 429 | BOOL LLSpinCtrl::handleKeyHere(KEY key, MASK mask) |
432 | { | 430 | { |
433 | if (mEditor->hasFocus()) | 431 | if (mEditor->hasFocus()) |
434 | { | 432 | { |