From 29236442de5ff66fa831fdc88698b4f97333c490 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Sun, 18 Aug 2019 17:20:20 -0400 Subject: [PATCH] A scroll list doesn't always handle double clicks --- indra/llui/llscrolllistctrl.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index ec8589a92..2aa1b17ec 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -1829,17 +1829,19 @@ BOOL LLScrollListCtrl::handleDoubleClick(S32 x, S32 y, MASK mask) { // Offer the click to the children, even if we aren't enabled // so the scroll bars will work. - if (NULL == LLView::childrenHandleDoubleClick(x, y, mask)) + handled = LLView::childrenHandleDoubleClick(x, y, mask) != nullptr; + if (!handled) { // Run the callback only if an item is being double-clicked. - if( mCanSelect && hitItem(x, y) && mOnDoubleClickCallback ) + if (mCanSelect && mOnDoubleClickCallback && hitItem(x, y)) { mOnDoubleClickCallback(); + handled = true; } } } - return TRUE; + return handled; } BOOL LLScrollListCtrl::handleClick(S32 x, S32 y, MASK mask)