diff options
author | Roxie Linden <roxie@lindenlab.com> | 2010-05-28 13:58:49 -0700 |
---|---|---|
committer | Roxie Linden <roxie@lindenlab.com> | 2010-05-28 13:58:49 -0700 |
commit | bb973c38e30bc0711265ba04630a8475a3f98c59 (patch) | |
tree | 718d71be296653e5de242c8ceecd910600065024 /indra | |
parent | d427942d957748257c18422b3d08172c42be35b8 (diff) | |
parent | 285c4c47f56e71e0b92dd82fa4737d0732b0dd26 (diff) |
automated merge
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llpaneloutfitedit.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llsidepanelappearance.cpp | 23 | ||||
-rw-r--r-- | indra/newview/llsidepanelappearance.h | 1 |
3 files changed, 25 insertions, 0 deletions
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index ae4b288588..9e51aaceca 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -36,6 +36,7 @@ // *TODO: reorder includes to match the coding standard #include "llagent.h" +#include "llagentcamera.h" #include "llagentwearables.h" #include "llappearancemgr.h" #include "llcofwearables.h" 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) diff --git a/indra/newview/llsidepanelappearance.h b/indra/newview/llsidepanelappearance.h index 5bde962c8d..30022ae375 100644 --- a/indra/newview/llsidepanelappearance.h +++ b/indra/newview/llsidepanelappearance.h @@ -72,6 +72,7 @@ public: private: void onFilterEdit(const std::string& search_string); + void onVisibilityChange ( const LLSD& new_visibility ); void onOpenOutfitButtonClicked(); void onEditAppearanceButtonClicked(); |