Fix a bug pointed out by LaMont Zuzu in which a texture dragged and dropped to one's profile image would be sent back to the user

Removes the unnecessary drop target and give item text in these cases.
On someone else's profile, you may drag and drop a replacement texture
On your profile, you have no reason to drag and drop an item, in fact this can cause bad inventory issues (yes, I've tested it)
This commit is contained in:
Inusaito Sayori
2013-05-17 10:06:08 -04:00
parent 36e218cf19
commit 00bbbe70a7

View File

@@ -360,6 +360,13 @@ void LLPanelAvatarSecondLife::enableControls(BOOL self)
{
childSetEnabled("img", self);
childSetEnabled("about", self);
if (self) // We can't give inventory to self
{
if (LLDropTarget* drop_target = findChild<LLDropTarget>("drop_target_rect"))
removeChild(drop_target);
if (LLTextBox* text_box = findChild<LLTextBox>("Give item:"))
removeChild(text_box);
}
childSetVisible("allow_publish", self);
childSetEnabled("allow_publish", self);
childSetVisible("?", self);