Commits

nyx committed 42e32d4

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

  • Participants
  • Parent commits d0bc621

Comments (0)

Files changed (1)

File indra/newview/llsidepanelappearance.cpp

 			{
 				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