summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llpaneloutfitedit.cpp1
-rw-r--r--indra/newview/llsidepanelappearance.cpp23
-rw-r--r--indra/newview/llsidepanelappearance.h1
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();