summaryrefslogtreecommitdiff
path: root/indra/newview/llsidepanelappearance.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-05-29 06:19:06 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-05-29 06:19:06 +0100
commit0ca09bea5ddfbb41e29fcc2b36e46c7e86171198 (patch)
tree6cea69c52dccf3ed3f5e0e77f80aa77f8ad88e9f /indra/newview/llsidepanelappearance.cpp
parent383d695fe6d14ba988820475e0cc9b64e18b7de5 (diff)
parent3df90898b18feeda876857acb00f1f3046793e69 (diff)
merge from viewer-public
Diffstat (limited to 'indra/newview/llsidepanelappearance.cpp')
-rw-r--r--indra/newview/llsidepanelappearance.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index 3719313c14..b66789448f 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -163,6 +163,8 @@ BOOL LLSidepanelAppearance::postBuild()
mOutfitRenameWatcher = new LLWatchForOutfitRenameObserver(this);
gInventory.addObserver(mOutfitRenameWatcher);
+ setVisibleCallback(boost::bind(&LLSidepanelAppearance::onVisibilityChange,this,_2));
+
return TRUE;
}
@@ -201,6 +203,27 @@ void LLSidepanelAppearance::onOpen(const LLSD& key)
mOpened = true;
}
+void LLSidepanelAppearance::onVisibilityChange(const LLSD &new_visibility)
+{
+ if (new_visibility.asBoolean())
+ {
+ if ((mOutfitEdit && mOutfitEdit->getVisible()) || (mEditWearable && mEditWearable->getVisible()))
+ {
+ if (!gAgentCamera.cameraCustomizeAvatar())
+ {
+ gAgentCamera.changeCameraToCustomizeAvatar();
+ }
+ }
+ }
+ else
+ {
+ if (gAgentCamera.cameraCustomizeAvatar())
+ {
+ gAgentCamera.changeCameraToDefault();
+ }
+ }
+}
+
void LLSidepanelAppearance::onFilterEdit(const std::string& search_string)
{
if (mFilterSubString != search_string)