summaryrefslogtreecommitdiff
path: root/indra/newview/llpaneleditwearable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpaneleditwearable.cpp')
-rw-r--r--indra/newview/llpaneleditwearable.cpp21
1 files changed, 19 insertions, 2 deletions
diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp
index 8bd2d5ad6a..b73d97e4c4 100644
--- a/indra/newview/llpaneleditwearable.cpp
+++ b/indra/newview/llpaneleditwearable.cpp
@@ -1133,7 +1133,7 @@ void LLPanelEditWearable::showWearable(LLWearable* wearable, BOOL show, BOOL dis
LLScrollingPanelList *panel_list = getChild<LLScrollingPanelList>(scrolling_panel);
LLAccordionCtrlTab *tab = getChild<LLAccordionCtrlTab>(accordion_tab);
-
+
if (!panel_list)
{
llwarns << "could not get scrolling panel list: " << scrolling_panel << llendl;
@@ -1145,7 +1145,18 @@ void LLPanelEditWearable::showWearable(LLWearable* wearable, BOOL show, BOOL dis
llwarns << "could not get llaccordionctrltab from UI with name: " << accordion_tab << llendl;
continue;
}
-
+
+ // Don't show female subparts if you're not female, etc.
+ if (!(gAgentAvatarp->getSex() & subpart_entry->mSex))
+ {
+ tab->setVisible(FALSE);
+ continue;
+ }
+ else
+ {
+ tab->setVisible(TRUE);
+ }
+
// what edit group do we want to extract params for?
const std::string edit_group = subpart_entry->mEditGroup;
@@ -1196,6 +1207,12 @@ void LLPanelEditWearable::onTabExpandedCollapsed(const LLSD& param, U8 index)
void LLPanelEditWearable::changeCamera(U8 subpart)
{
+ // Don't change the camera if this type doesn't have a camera switch.
+ // Useful for wearables like physics that don't have an associated physical body part.
+ if (LLWearableType::getDisableCameraSwitch(mWearablePtr->getType()))
+ {
+ return;
+ }
const LLEditWearableDictionary::WearableEntry *wearable_entry = LLEditWearableDictionary::getInstance()->getWearable(mWearablePtr->getType());
if (!wearable_entry)
{