diff options
author | AlexanderP ProductEngine <apaschenko@productengine.com> | 2012-11-19 17:40:46 +0200 |
---|---|---|
committer | AlexanderP ProductEngine <apaschenko@productengine.com> | 2012-11-19 17:40:46 +0200 |
commit | 48a683af70fe359f4b4b6fdf6486208fc34dc2a9 (patch) | |
tree | 9eb20905a4b98eff137951ebde0fec7d60a64c28 /indra/llui/llbutton.cpp | |
parent | c48f8c2b28253786ada02d0a57d3a8e005fe9101 (diff) |
CHUI-488 ADD. fIX Clean up code
Diffstat (limited to 'indra/llui/llbutton.cpp')
-rw-r--r-- | indra/llui/llbutton.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index 8a34e221b1..8ac55b2eb4 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -174,9 +174,10 @@ LLButton::LLButton(const LLButton::Params& p) { // If optional parameter "p.button_flash_count" is not provided, LLFlashTimer will be // used instead it a "default" value from gSavedSettings.getS32("FlashCount")). - // Likewise, missing "p.button_flash_rate" is replaced by gSavedSettings.getF32("FlashPeriod"); - S32 flash_count = p.button_flash_count || 0; - F32 flash_rate = p.button_flash_rate || 0.0; // + // Likewise, missing "p.button_flash_rate" is replaced by gSavedSettings.getF32("FlashPeriod"). + // Note: flashing should be allowed in settings.xml (boolean key "EnableButtonFlashing"). + S32 flash_count = p.button_flash_count.isProvided()? p.button_flash_count : 0; + F32 flash_rate = p.button_flash_rate.isProvided()? p.button_flash_rate : 0.0; mFlashingTimer = new LLFlashTimer ((LLFlashTimer::callback_t)NULL, flash_count, flash_rate); static LLUICachedControl<S32> llbutton_orig_h_pad ("UIButtonOrigHPad", 0); |