summaryrefslogtreecommitdiff
path: root/indra/newview/llsidepanelappearance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llsidepanelappearance.cpp')
-rw-r--r--indra/newview/llsidepanelappearance.cpp43
1 files changed, 38 insertions, 5 deletions
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index 3f05e05fd4..3719313c14 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -47,6 +47,7 @@
#include "llsidetray.h"
#include "lltextbox.h"
#include "lluictrlfactory.h"
+#include "llviewercontrol.h"
#include "llviewerregion.h"
#include "llvoavatarself.h"
#include "llwearable.h"
@@ -267,14 +268,14 @@ void LLSidepanelAppearance::showOutfitsInventoryPanel()
void LLSidepanelAppearance::showOutfitEditPanel()
{
togglMyOutfitsPanel(FALSE);
- toggleWearableEditPanel(FALSE);
+ toggleWearableEditPanel(FALSE, NULL, TRUE); // don't switch out of edit appearance mode
toggleOutfitEditPanel(TRUE);
}
void LLSidepanelAppearance::showWearableEditPanel(LLWearable *wearable /* = NULL*/)
{
togglMyOutfitsPanel(FALSE);
- toggleOutfitEditPanel(FALSE);
+ toggleOutfitEditPanel(FALSE, TRUE); // don't switch out of edit appearance mode
toggleWearableEditPanel(TRUE, wearable);
}
@@ -300,7 +301,7 @@ void LLSidepanelAppearance::togglMyOutfitsPanel(BOOL visible)
}
}
-void LLSidepanelAppearance::toggleOutfitEditPanel(BOOL visible)
+void LLSidepanelAppearance::toggleOutfitEditPanel(BOOL visible, BOOL disable_camera_switch)
{
if (!mOutfitEdit || mOutfitEdit->getVisible() == visible)
{
@@ -313,10 +314,18 @@ void LLSidepanelAppearance::toggleOutfitEditPanel(BOOL visible)
if (visible)
{
mOutfitEdit->onOpen(LLSD());
+ if (!disable_camera_switch && gSavedSettings.getBOOL("AppearanceCameraMovement") )
+ {
+ gAgentCamera.changeCameraToCustomizeAvatar();
+ }
+ }
+ else if (!disable_camera_switch && gSavedSettings.getBOOL("AppearanceCameraMovement") )
+ {
+ gAgentCamera.changeCameraToDefault();
}
}
-void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLWearable *wearable)
+void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLWearable *wearable, BOOL disable_camera_switch)
{
if (!mEditWearable || mEditWearable->getVisible() == visible)
{
@@ -335,16 +344,24 @@ void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLWearable *we
// Toggle panel visibility.
mEditWearable->setVisible(visible);
- mEditWearable->setWearable(wearable);
if (visible)
{
+ mEditWearable->setWearable(wearable);
mEditWearable->onOpen(LLSD()); // currently no-op, just for consistency
+ if (!disable_camera_switch && gSavedSettings.getBOOL("AppearanceCameraMovement") )
+ {
+ gAgentCamera.changeCameraToCustomizeAvatar();
+ }
}
else
{
// Save changes if closing.
mEditWearable->saveChanges();
+ if (!disable_camera_switch && gSavedSettings.getBOOL("AppearanceCameraMovement") )
+ {
+ gAgentCamera.changeCameraToDefault();
+ }
}
}
@@ -448,3 +465,19 @@ void LLSidepanelAppearance::setWearablesLoading(bool val)
childSetVisible("wearables_loading_indicator", val);
childSetVisible("edit_outfit_btn", !val);
}
+
+void LLSidepanelAppearance::showDefaultSubpart()
+{
+ if (mEditWearable->getVisible())
+ {
+ mEditWearable->showDefaultSubpart();
+ }
+}
+
+void LLSidepanelAppearance::updateScrollingPanelList()
+{
+ if (mEditWearable->getVisible())
+ {
+ mEditWearable->updateScrollingPanelList();
+ }
+}