diff options
author | Steve Bennetts <steve@lindenlab.com> | 2009-10-12 13:22:58 -0700 |
---|---|---|
committer | Steve Bennetts <steve@lindenlab.com> | 2009-10-12 13:22:58 -0700 |
commit | 4a1ef20c317897e7e509c7f599e97fcc90ffaefc (patch) | |
tree | c496bd8785b94bb60bca33ea59758c5929341451 /indra/llui/lltooltip.cpp | |
parent | 895e8ad446ab383e1211f759e8b55aa0fff2efc1 (diff) | |
parent | d4b2897700c66354413af42ab055bd1aaa47f91c (diff) |
merge
Diffstat (limited to 'indra/llui/lltooltip.cpp')
-rw-r--r-- | indra/llui/lltooltip.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/indra/llui/lltooltip.cpp b/indra/llui/lltooltip.cpp index 8f5c029816..c55273cacf 100644 --- a/indra/llui/lltooltip.cpp +++ b/indra/llui/lltooltip.cpp @@ -38,6 +38,7 @@ // Library includes #include "lltextbox.h" #include "lliconctrl.h" +#include "llmenugl.h" // hideMenus() #include "llui.h" // positionViewNearMouse() #include "llwindow.h" @@ -94,7 +95,16 @@ BOOL LLToolTipView::handleHover(S32 x, S32 y, MASK mask) BOOL LLToolTipView::handleMouseDown(S32 x, S32 y, MASK mask) { LLToolTipMgr::instance().blockToolTips(); - return LLView::handleMouseDown(x, y, mask); + + if (LLView::handleMouseDown(x, y, mask)) + { + // If we are handling the mouse event menu holder + // won't get a chance to close menus so do this here + LLMenuGL::sMenuContainer->hideMenus(); + return TRUE; + } + + return FALSE; } BOOL LLToolTipView::handleMiddleMouseDown(S32 x, S32 y, MASK mask) @@ -189,7 +199,7 @@ LLToolTip::LLToolTip(const LLToolTip::Params& p) addChild(LLUICtrlFactory::create<LLIconCtrl>(icon_params)); // move text over to fit image in - mTextBox->translate(TOOLTIP_ICON_SIZE,0); + mTextBox->translate(TOOLTIP_ICON_SIZE + mPadding, 0); } if (p.click_callback.isProvided()) |