aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui/llspinctrl.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:42 -0500
committerJacek Antonelli2008-08-15 23:45:42 -0500
commitce28e056c20bf2723f565bbf464b87781ec248a2 (patch)
treeef7b0501c4de4b631a916305cbc2a5fdc125e52d /linden/indra/llui/llspinctrl.cpp
parentSecond Life viewer sources 1.19.1.4b (diff)
downloadmeta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.zip
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.gz
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.bz2
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.xz
Second Life viewer sources 1.20.2
Diffstat (limited to 'linden/indra/llui/llspinctrl.cpp')
-rw-r--r--linden/indra/llui/llspinctrl.cpp22
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
53const U32 MAX_STRING_LENGTH = 32; 53const U32 MAX_STRING_LENGTH = 32;
54 54
55static LLRegisterWidget<LLSpinCtrl> r2("spinner");
55 56
56LLSpinCtrl::LLSpinCtrl( const LLString& name, const LLRect& rect, const LLString& label, const LLFontGL* font, 57LLSpinCtrl::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
410BOOL LLSpinCtrl::handleScrollWheel(S32 x, S32 y, S32 clicks) 411BOOL 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
431BOOL LLSpinCtrl::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent) 429BOOL LLSpinCtrl::handleKeyHere(KEY key, MASK mask)
432{ 430{
433 if (mEditor->hasFocus()) 431 if (mEditor->hasFocus())
434 { 432 {