diff options
author | Nyx (Neal Orman) <nyx@lindenlab.com> | 2010-05-21 17:02:53 -0400 |
---|---|---|
committer | Nyx (Neal Orman) <nyx@lindenlab.com> | 2010-05-21 17:02:53 -0400 |
commit | f91481c82faf1f9527cf54f7dbf4cbc28555003b (patch) | |
tree | e37d53e4714be56a79d08108ed1eda205410e341 /indra/newview/llsidepanelappearance.cpp | |
parent | be20b12c5c225e5dbc564ba32dee87b4bf1722b5 (diff) |
EXT-7209 EXT-7366 FIX avatar needs to enter "appearance editing" mode
Avatar now enters "appearance editing" mode when opening the outfit or
wearable editors in the sidepanel. Changed code to ensure we don't
accidentally switch out of it and back in when switching from one to the other.
Note that this cuts out LLFLoaterCustomize from being built and shown to the user
from any UI. The code for this (and related classes) will be removed once we have
pulled any code out of it that we still need. The current outfit and wearable
editors should be working sufficiently for most purposes. Bugs should be reported
to Nyx Linden or the avatar team.
Code reviewed by Vir
Diffstat (limited to 'indra/newview/llsidepanelappearance.cpp')
-rw-r--r-- | indra/newview/llsidepanelappearance.cpp | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index 3f05e05fd4..010d593b27 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -47,6 +47,7 @@ #include "llsidetray.h" #include "lltextbox.h" #include "lluictrlfactory.h" +#include "llviewercontrol.h" #include "llviewerregion.h" #include "llvoavatarself.h" #include "llwearable.h" @@ -267,14 +268,14 @@ void LLSidepanelAppearance::showOutfitsInventoryPanel() void LLSidepanelAppearance::showOutfitEditPanel() { togglMyOutfitsPanel(FALSE); - toggleWearableEditPanel(FALSE); + toggleWearableEditPanel(FALSE, NULL, TRUE); // don't switch out of edit appearance mode toggleOutfitEditPanel(TRUE); } void LLSidepanelAppearance::showWearableEditPanel(LLWearable *wearable /* = NULL*/) { togglMyOutfitsPanel(FALSE); - toggleOutfitEditPanel(FALSE); + toggleOutfitEditPanel(FALSE, TRUE); // don't switch out of edit appearance mode toggleWearableEditPanel(TRUE, wearable); } @@ -300,7 +301,7 @@ void LLSidepanelAppearance::togglMyOutfitsPanel(BOOL visible) } } -void LLSidepanelAppearance::toggleOutfitEditPanel(BOOL visible) +void LLSidepanelAppearance::toggleOutfitEditPanel(BOOL visible, BOOL disable_camera_switch) { if (!mOutfitEdit || mOutfitEdit->getVisible() == visible) { @@ -313,10 +314,18 @@ void LLSidepanelAppearance::toggleOutfitEditPanel(BOOL visible) if (visible) { mOutfitEdit->onOpen(LLSD()); + if (!disable_camera_switch && gSavedSettings.getBOOL("AppearanceCameraMovement") ) + { + gAgentCamera.changeCameraToCustomizeAvatar(); + } + } + else if (!disable_camera_switch && gSavedSettings.getBOOL("AppearanceCameraMovement") ) + { + gAgentCamera.changeCameraToDefault(); } } -void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLWearable *wearable) +void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLWearable *wearable, BOOL disable_camera_switch) { if (!mEditWearable || mEditWearable->getVisible() == visible) { @@ -340,11 +349,19 @@ void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLWearable *we if (visible) { mEditWearable->onOpen(LLSD()); // currently no-op, just for consistency + if (!disable_camera_switch && gSavedSettings.getBOOL("AppearanceCameraMovement") ) + { + gAgentCamera.changeCameraToCustomizeAvatar(); + } } else { // Save changes if closing. mEditWearable->saveChanges(); + if (!disable_camera_switch && gSavedSettings.getBOOL("AppearanceCameraMovement") ) + { + gAgentCamera.changeCameraToDefault(); + } } } |