summaryrefslogtreecommitdiff
path: root/indra/newview/llsidepanelappearance.cpp
diff options
context:
space:
mode:
authorDessie Linden <dessie@lindenlab.com>2010-06-01 04:47:53 -0700
committerDessie Linden <dessie@lindenlab.com>2010-06-01 04:47:53 -0700
commit20a69c3771937c55a9a25417e8ef1166081a525b (patch)
treefbc5f565464d098815a60d9aea28d92f986e4ffa /indra/newview/llsidepanelappearance.cpp
parent66186ea81fd192e1ec88e0ea879af44726c0ea57 (diff)
parent4cc5c7d2a4511ffc65bf3b6b0b2e29beb5b0fed4 (diff)
Merged 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)