summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llfloatercamera.cpp23
-rw-r--r--indra/newview/llfloatercamera.h3
2 files changed, 22 insertions, 4 deletions
diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp
index 0fa536dfad..85a5f076ab 100644
--- a/indra/newview/llfloatercamera.cpp
+++ b/indra/newview/llfloatercamera.cpp
@@ -62,6 +62,7 @@ const F32 CAMERA_BUTTON_DELAY = 0.0f;
#define CONTROLS "controls"
bool LLFloaterCamera::sFreeCamera = false;
+bool LLFloaterCamera::sAppearanceEditing = false;
// Zoom the camera in and out
class LLPanelCameraZoom
@@ -245,16 +246,21 @@ void LLFloaterCamera::resetCameraMode()
void LLFloaterCamera::onAvatarEditingAppearance(bool editing)
{
+ sAppearanceEditing = editing;
LLFloaterCamera* floater_camera = LLFloaterCamera::findInstance();
if (!floater_camera) return;
+ floater_camera->handleAvatarEditingAppearance(editing);
+}
+void LLFloaterCamera::handleAvatarEditingAppearance(bool editing)
+{
//camera presets (rear, front, etc.)
- floater_camera->childSetEnabled("preset_views_list", !editing);
- floater_camera->childSetEnabled("presets_btn", !editing);
+ childSetEnabled("preset_views_list", !editing);
+ childSetEnabled("presets_btn", !editing);
//camera modes (object view, mouselook view)
- floater_camera->childSetEnabled("camera_modes_list", !editing);
- floater_camera->childSetEnabled("avatarview_btn", !editing);
+ childSetEnabled("camera_modes_list", !editing);
+ childSetEnabled("avatarview_btn", !editing);
}
void LLFloaterCamera::update()
@@ -349,6 +355,9 @@ BOOL LLFloaterCamera::postBuild()
update();
+ // ensure that appearance mode is handled while building. See EXT-7796.
+ handleAvatarEditingAppearance(sAppearanceEditing);
+
return LLDockableFloater::postBuild();
}
@@ -371,6 +380,12 @@ void LLFloaterCamera::fillFlatlistFromPanel (LLFlatListView* list, LLPanel* pane
ECameraControlMode LLFloaterCamera::determineMode()
{
+ if (sAppearanceEditing)
+ {
+ // this is the only enabled camera mode while editing agent appearance.
+ return CAMERA_CTRL_MODE_PAN;
+ }
+
LLTool* curr_tool = LLToolMgr::getInstance()->getCurrentTool();
if (curr_tool == LLToolCamera::getInstance())
{
diff --git a/indra/newview/llfloatercamera.h b/indra/newview/llfloatercamera.h
index c5f8cd6db5..737bd17e72 100644
--- a/indra/newview/llfloatercamera.h
+++ b/indra/newview/llfloatercamera.h
@@ -124,9 +124,12 @@ private:
// fills flatlist with items from given panel
void fillFlatlistFromPanel (LLFlatListView* list, LLPanel* panel);
+ void handleAvatarEditingAppearance(bool editing);
+
// set to true when free camera mode is selected in modes list
// remains true until preset camera mode is chosen, or pan button is clicked, or escape pressed
static bool sFreeCamera;
+ static bool sAppearanceEditing;
BOOL mClosed;
ECameraControlMode mPrevMode;
ECameraControlMode mCurrMode;