diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-05-29 06:19:06 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-05-29 06:19:06 +0100 |
commit | 0ca09bea5ddfbb41e29fcc2b36e46c7e86171198 (patch) | |
tree | 6cea69c52dccf3ed3f5e0e77f80aa77f8ad88e9f /indra/newview/llsidepanelappearance.cpp | |
parent | 383d695fe6d14ba988820475e0cc9b64e18b7de5 (diff) | |
parent | 3df90898b18feeda876857acb00f1f3046793e69 (diff) |
merge from viewer-public
Diffstat (limited to 'indra/newview/llsidepanelappearance.cpp')
-rw-r--r-- | indra/newview/llsidepanelappearance.cpp | 23 |
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) |