summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNyx (Neal Orman) <nyx@lindenlab.com>2010-07-01 18:03:08 -0400
committerNyx (Neal Orman) <nyx@lindenlab.com>2010-07-01 18:03:08 -0400
commitc0bba7e7812622120e81154cfe5dcd1131c5e4da (patch)
tree09aa324f76e4f7406e87454821abd0eb70d09a80
parent928b205329fb4392c6ed6b659f4ef7cda6e056d3 (diff)
EXT-7993 FIX able to edit a clothing item you're not wearing
Added check on restoring appearance sidepanel to ensure you're still wearing the wearable you're editing. Code reviewed by Seraph
-rw-r--r--indra/newview/llsidepanelappearance.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index 951323551c..7a7ffb9983 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -196,6 +196,15 @@ void LLSidepanelAppearance::onVisibilityChange(const LLSD &new_visibility)
{
gAgentCamera.changeCameraToCustomizeAvatar();
}
+ if (mEditWearable && mEditWearable->getVisible())
+ {
+ LLWearable *wearable_ptr = mEditWearable->getWearable();
+ if (gAgentWearables.getWearableIndex(wearable_ptr) == LLAgentWearables::MAX_CLOTHING_PER_TYPE)
+ {
+ // we're no longer wearing the wearable we were last editing, switch back to outfit editor
+ showOutfitEditPanel();
+ }
+ }
}
}
else