From 00bbbe70a7f15aadaeaa2e2c143276f66b275acd Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Fri, 17 May 2013 10:06:08 -0400 Subject: [PATCH] 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) --- indra/newview/llpanelavatar.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index 92c71d8bb..80bb82a65 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -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("drop_target_rect")) + removeChild(drop_target); + if (LLTextBox* text_box = findChild("Give item:")) + removeChild(text_box); + } childSetVisible("allow_publish", self); childSetEnabled("allow_publish", self); childSetVisible("?", self);