From 8d87d3410ee7e13c395e26d1bf0abfa719a31a91 Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Thu, 18 Jul 2013 04:58:29 -0400 Subject: [PATCH] When the mouse leaves a scroll list, don't leave the mouse-over highlight shown --- indra/llui/llscrolllistctrl.cpp | 5 +++++ indra/llui/llscrolllistctrl.h | 1 + 2 files changed, 6 insertions(+) diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 7d77a51a5..f2c5084be 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -1922,6 +1922,11 @@ BOOL LLScrollListCtrl::handleHover(S32 x,S32 y,MASK mask) return handled; } +void LLScrollListCtrl::onMouseLeave(S32 x, S32 y, MASK mask) +{ + // clear mouse highlight + mouseOverHighlightNthItem(-1); +} BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask ) { diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h index 5b5b91d2d..27735f47a 100644 --- a/indra/llui/llscrolllistctrl.h +++ b/indra/llui/llscrolllistctrl.h @@ -261,6 +261,7 @@ public: /*virtual*/ void setFocus( BOOL b ); /*virtual*/ void onFocusReceived(); /*virtual*/ void onFocusLost(); + /*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask); /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); virtual BOOL isDirty() const;