diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llfloaterpreferenceviewadvanced.cpp | 60 | ||||
-rw-r--r-- | indra/newview/llfloaterpreferenceviewadvanced.h | 4 |
2 files changed, 10 insertions, 54 deletions
diff --git a/indra/newview/llfloaterpreferenceviewadvanced.cpp b/indra/newview/llfloaterpreferenceviewadvanced.cpp index 055c6f2232..791ff79d87 100644 --- a/indra/newview/llfloaterpreferenceviewadvanced.cpp +++ b/indra/newview/llfloaterpreferenceviewadvanced.cpp @@ -70,62 +70,18 @@ BOOL LLFloaterPreferenceViewAdvanced::postBuild() return TRUE; } -void LLFloaterPreferenceViewAdvanced::updateCameraControl(LLVector3 vector) +void LLFloaterPreferenceViewAdvanced::updateCameraControl(const LLVector3& vector) { - LLSpinCtrl* spinnerx = getChild<LLSpinCtrl>("camera_x"); - LLSpinCtrl* spinnery = getChild<LLSpinCtrl>("camera_y"); - LLSpinCtrl* spinnerz = getChild<LLSpinCtrl>("camera_z"); - - if (!spinnerx || !spinnery || !spinnerz) - { - LL_WARNS() << "Could not find all desired UI camera elements" - << LL_ENDL; - return; - } - - if (!spinnerx->hasFocus()) - { - spinnerx->setValue(vector[VX]); - } - - if (!spinnery->hasFocus()) - { - spinnery->setValue(vector[VY]); - } - - if (!spinnerz->hasFocus()) - { - spinnerz->setValue(vector[VZ]); - } + getChild<LLSpinCtrl>("camera_x")->setValue(vector[VX]); + getChild<LLSpinCtrl>("camera_y")->setValue(vector[VY]); + getChild<LLSpinCtrl>("camera_z")->setValue(vector[VZ]); } -void LLFloaterPreferenceViewAdvanced::updateFocusControl(LLVector3d vector3d) +void LLFloaterPreferenceViewAdvanced::updateFocusControl(const LLVector3d& vector3d) { - LLSpinCtrl* spinnerx = getChild<LLSpinCtrl>("focus_x"); - LLSpinCtrl* spinnery = getChild<LLSpinCtrl>("focus_y"); - LLSpinCtrl* spinnerz = getChild<LLSpinCtrl>("focus_z"); - - if (!spinnerx || !spinnery || !spinnerz) - { - LL_WARNS() << "Could not find all desired UI focus elements" - << LL_ENDL; - return; - } - - if (!spinnerx->hasFocus()) - { - spinnerx->setValue(vector3d[VX]); - } - - if (!spinnery->hasFocus()) - { - spinnery->setValue(vector3d[VY]); - } - - if (!spinnerz->hasFocus()) - { - spinnerz->setValue(vector3d[VZ]); - } + getChild<LLSpinCtrl>("focus_x")->setValue(vector3d[VX]); + getChild<LLSpinCtrl>("focus_y")->setValue(vector3d[VY]); + getChild<LLSpinCtrl>("focus_z")->setValue(vector3d[VZ]); } void LLFloaterPreferenceViewAdvanced::draw() diff --git a/indra/newview/llfloaterpreferenceviewadvanced.h b/indra/newview/llfloaterpreferenceviewadvanced.h index 5b63770059..8f4b594605 100644 --- a/indra/newview/llfloaterpreferenceviewadvanced.h +++ b/indra/newview/llfloaterpreferenceviewadvanced.h @@ -43,8 +43,8 @@ public: void onCommitSettings(); void onClickCancel(); void onClickOk(); - void updateCameraControl(LLVector3 vector); - void updateFocusControl(LLVector3d vector3d); + void updateCameraControl(const LLVector3& vector); + void updateFocusControl(const LLVector3d& vector3d); private: virtual ~LLFloaterPreferenceViewAdvanced(); |