From 54c87e94732e783314b7abbf60824dba8d00d8cd Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Thu, 26 May 2011 04:13:12 -0500 Subject: Better behavior for disabled texture_picker (LLTextureCtrl) widgets. Before, a disabled texture_picker widget would still open a floater when clicked, change the mouse cursor on hover, and accept drag-and-drops. Now, it actually behaves in a disabled way. --- linden/indra/newview/lltexturectrl.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/linden/indra/newview/lltexturectrl.cpp b/linden/indra/newview/lltexturectrl.cpp index ccc3ab2..e58b0b4 100644 --- a/linden/indra/newview/lltexturectrl.cpp +++ b/linden/indra/newview/lltexturectrl.cpp @@ -1304,6 +1304,7 @@ public: BOOL LLTextureCtrl::handleHover(S32 x, S32 y, MASK mask) { + if (!getEnabled()) { return FALSE; } getWindow()->setCursor(UI_CURSOR_HAND); return TRUE; } @@ -1311,6 +1312,7 @@ BOOL LLTextureCtrl::handleHover(S32 x, S32 y, MASK mask) BOOL LLTextureCtrl::handleMouseDown(S32 x, S32 y, MASK mask) { + if (!getEnabled()) { return FALSE; } BOOL handled = LLUICtrl::handleMouseDown( x, y , mask ); if( handled ) { @@ -1421,6 +1423,8 @@ BOOL LLTextureCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, EAcceptance *accept, std::string& tooltip_msg) { + if (!getEnabled()) { return FALSE; } + BOOL handled = FALSE; // this downcast may be invalid - but if the second test below -- cgit v1.1