diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-02-25 11:08:07 +0000 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-02-25 11:08:07 +0000 |
commit | 1beaa01f57787f08e960c348010b5dedcecbb738 (patch) | |
tree | 3c8abf5be4bda150696e358fb7c4e3077514bac0 /indra/newview/llfloatercamera.cpp | |
parent | 0faa004aa11cca9b60dfe8c176a0f407e880d809 (diff) | |
parent | c4277e421ca8934e405d778f3c86f21760c55c9d (diff) |
PE merge.
Diffstat (limited to 'indra/newview/llfloatercamera.cpp')
-rw-r--r-- | indra/newview/llfloatercamera.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp index ecb6254f8a..abf60a29b4 100644 --- a/indra/newview/llfloatercamera.cpp +++ b/indra/newview/llfloatercamera.cpp @@ -354,6 +354,8 @@ void LLFloaterCamera::updateState() childSetVisible(ZOOM, CAMERA_CTRL_MODE_AVATAR_VIEW != mCurrMode); childSetVisible(PRESETS, CAMERA_CTRL_MODE_AVATAR_VIEW == mCurrMode); + updateCameraPresetButtons(); + //hiding or showing the panel with controls by reshaping the floater bool showControls = CAMERA_CTRL_MODE_FREE_CAMERA != mCurrMode; if (showControls == childIsVisible(CONTROLS)) return; @@ -384,6 +386,16 @@ void LLFloaterCamera::updateState() } } +void LLFloaterCamera::updateCameraPresetButtons() +{ + ECameraPreset preset = (ECameraPreset) gSavedSettings.getU32("CameraPreset"); + + childSetValue("rear_view", preset == CAMERA_PRESET_REAR_VIEW); + childSetValue("group_view", preset == CAMERA_PRESET_GROUP_VIEW); + childSetValue("front_view", preset == CAMERA_PRESET_FRONT_VIEW); + childSetValue("mouselook_view", gAgent.cameraMouselook()); +} + void LLFloaterCamera::onClickCameraPresets(const LLSD& param) { std::string name = param.asString(); @@ -405,4 +417,7 @@ void LLFloaterCamera::onClickCameraPresets(const LLSD& param) gAgent.changeCameraToMouselook(); } + LLFloaterCamera* camera_floater = LLFloaterCamera::findInstance(); + if (camera_floater) + camera_floater->updateCameraPresetButtons(); } |