summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2016-11-23 19:28:54 +0200
committerandreykproductengine <akleshchev@productengine.com>2016-11-23 19:28:54 +0200
commitb3493dcaeeb49ca503cb889cbe9e95a63f8eed56 (patch)
treeb7e43e69e2b7df87caa26cd0f3bf64c22b1a9420 /indra/newview
parent52553473b3da45f1984fefca7e75398556213209 (diff)
MAINT-6951 Fixed Appearance panel causing camera movement regardless of circumstance.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llsidepanelappearance.cpp22
1 files changed, 16 insertions, 6 deletions
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index f07f0ed86c..a32ed258f8 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -383,12 +383,22 @@ void LLSidepanelAppearance::toggleOutfitEditPanel(BOOL visible, BOOL disable_cam
void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLViewerWearable *wearable, BOOL disable_camera_switch)
{
- if (!mEditWearable || ((mEditWearable->getWearable() == wearable) && mEditWearable->getVisible() == visible))
+ if (!mEditWearable)
{
- // visibility isn't changing, hence nothing to do
return;
}
+ if (mEditWearable->getVisible() == visible && (!visible || mEditWearable->getWearable() != wearable))
+ {
+ // visibility isn't changing and panel doesn't need an update, hence nothing to do
+ return;
+ }
+
+ // If we're just switching between outfit and wearable editing or updating item,
+ // don't end customization and don't switch camera
+ // Don't end customization and don't switch camera without visibility change
+ BOOL change_state = !disable_camera_switch && mEditWearable->getVisible() != visible;
+
if (!wearable)
{
wearable = gAgentWearables.getViewerWearable(LLWearableType::WT_SHAPE, 0);
@@ -403,8 +413,8 @@ void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLViewerWearab
if (visible)
{
- LLVOAvatarSelf::onCustomizeStart(disable_camera_switch);
- mEditWearable->setWearable(wearable, disable_camera_switch);
+ LLVOAvatarSelf::onCustomizeStart(!change_state);
+ mEditWearable->setWearable(wearable, !change_state);
mEditWearable->onOpen(LLSD()); // currently no-op, just for consistency
}
else
@@ -412,9 +422,9 @@ void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLViewerWearab
// Save changes if closing.
mEditWearable->saveChanges();
LLAppearanceMgr::getInstance()->updateIsDirty();
- if (!disable_camera_switch) // if we're just switching between outfit and wearable editing, don't end customization.
+ if (change_state)
{
- LLVOAvatarSelf::onCustomizeEnd(disable_camera_switch);
+ LLVOAvatarSelf::onCustomizeEnd(!change_state);
}
}
}