diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-28 10:52:15 -0800 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-28 10:52:15 -0800 |
commit | a9d86c8133960635bc8a116f68348bf447a39690 (patch) | |
tree | 16b7a3d73942a1cacaa635ce478ee99334902201 /indra | |
parent | cad4ca01dc804d14c022b63e6a8541e46b1a8309 (diff) |
CID-378
Checker: UNINIT_CTOR
Function: LLFloaterJoystick::LLFloaterJoystick(const LLSD &)
File: /indra/newview/llfloaterjoystick.cpp
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfloaterjoystick.cpp | 11 | ||||
-rw-r--r-- | indra/newview/llfloaterjoystick.h | 2 |
2 files changed, 10 insertions, 3 deletions
diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp index 06fe2a84c8..78bc63ac8c 100644 --- a/indra/newview/llfloaterjoystick.cpp +++ b/indra/newview/llfloaterjoystick.cpp @@ -52,6 +52,7 @@ LLFloaterJoystick::LLFloaterJoystick(const LLSD& data) { //Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_joystick.xml"); + initFromSettings(); } void LLFloaterJoystick::draw() @@ -123,10 +124,8 @@ void LLFloaterJoystick::apply() { } -void LLFloaterJoystick::refresh() +void LLFloaterJoystick::initFromSettings() { - LLFloater::refresh(); - mJoystickEnabled = gSavedSettings.getBOOL("JoystickEnabled"); mJoystickAxis[0] = gSavedSettings.getS32("JoystickAxis0"); @@ -194,6 +193,12 @@ void LLFloaterJoystick::refresh() mFlycamFeathering = gSavedSettings.getF32("FlycamFeathering"); } +void LLFloaterJoystick::refresh() +{ + LLFloater::refresh(); + initFromSettings(); +} + void LLFloaterJoystick::cancel() { gSavedSettings.setBOOL("JoystickEnabled", mJoystickEnabled); diff --git a/indra/newview/llfloaterjoystick.h b/indra/newview/llfloaterjoystick.h index f3559c28e9..7a2f497c69 100644 --- a/indra/newview/llfloaterjoystick.h +++ b/indra/newview/llfloaterjoystick.h @@ -55,6 +55,8 @@ private: LLFloaterJoystick(const LLSD& data); virtual ~LLFloaterJoystick(); + + void initFromSettings(); static void onCommitJoystickEnabled(LLUICtrl*, void*); static void onClickRestoreSNDefaults(void*); |