From 2180706f4cb5e8f5ba24b3973a25a50c6176be38 Mon Sep 17 00:00:00 2001 From: Richard Nelson <richard@lindenlab.com> Date: Tue, 20 Oct 2009 01:40:13 +0000 Subject: EXT-1583 - Landmark "Favorites Bar" item tool-tips need to remain onscreen while mouse pointer is over them. also, improved tooltip display to show region name and coordinates reviewed by Leyla --- indra/llui/lltooltip.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'indra/llui/lltooltip.cpp') diff --git a/indra/llui/lltooltip.cpp b/indra/llui/lltooltip.cpp index f30e56b907..c8094f9c7c 100644 --- a/indra/llui/lltooltip.cpp +++ b/indra/llui/lltooltip.cpp @@ -183,6 +183,7 @@ LLToolTip::LLToolTip(const LLToolTip::Params& p) params.font = p.font; params.use_ellipses = true; params.wrap = p.wrap; + params.allow_html = false; // disallow hyperlinks in tooltips, as they want to spawn their own explanatory tooltips mTextBox = LLUICtrlFactory::create<LLTextBox> (params); addChild(mTextBox); @@ -319,9 +320,16 @@ void LLToolTipMgr::createToolTip(const LLToolTip::Params& params) LLToolTip::Params tooltip_params(params); // block mouse events if there is a click handler registered (specifically, hover) - tooltip_params.mouse_opaque = params.click_callback.isProvided(); + if (params.click_callback.isProvided()) + { + // set mouse_opaque to true if it wasn't already set to something else + // this prevents mouse down from going "through" the tooltip and ultimately + // causing the tooltip to disappear + tooltip_params.mouse_opaque.setIfNotProvided(true); + } tooltip_params.rect = LLRect (0, 1, 1, 0); + mToolTip = LLUICtrlFactory::create<LLToolTip> (tooltip_params); mToolTip->setValue(params.message()); gToolTipView->addChild(mToolTip); -- cgit v1.2.3