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
This commit is contained in:
Liru Færs
2019-10-22 00:51:57 -04:00
parent 8288de7f79
commit 18b02594cb

View File

@@ -1471,9 +1471,10 @@ BOOL LLTextureCtrl::handleMouseDown(S32 x, S32 y, MASK mask)
// <edit>
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...