From 18b02594cbfa5e2897d338354e0fc773744888fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Tue, 22 Oct 2019 00:51:57 -0400 Subject: [PATCH] Only have texture picker handle clicks with cb if on a visible portion Fixes the bug wherein clicking the top of the a profile's groups list would open that avatar's picture --- indra/newview/lltexturectrl.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 71afcf0fe..192f2bc9f 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -1471,9 +1471,10 @@ BOOL LLTextureCtrl::handleMouseDown(S32 x, S32 y, MASK mask) // if(!mEnable) return FALSE; - BOOL handled = LLUICtrl::handleMouseDown( x, y , mask ); + const auto clicked_picture = mBorder->parentPointInView(x, y); + BOOL handled = (mCaption->getText().empty() || clicked_picture) && LLUICtrl::handleMouseDown( x, y , mask ); - if (!handled && mBorder->parentPointInView(x, y)) + if (!handled && clicked_picture) { showPicker(FALSE); //grab textures first...