diff options
author | Richard Nelson <richard@lindenlab.com> | 2009-09-23 22:25:18 +0000 |
---|---|---|
committer | Richard Nelson <richard@lindenlab.com> | 2009-09-23 22:25:18 +0000 |
commit | afcdda2e361855e2a02eb39c8cec080019ac769f (patch) | |
tree | 1e064f259b35aca3cf5c685c3993656b09ec8d1e /indra/llui/llview.cpp | |
parent | 8a9204596af763d618ec6e67a5289b4799e1a1e2 (diff) |
EXT-904 Build tools does not show tooltips on any checkbox
EXT-877 There is no tooltip with a date for Time indicator in Nav bar
EXT-860 Crosshairs and "Press ESC to..." warning are dislocated in mouselook mode when UI Size is not exactly set to 1.00 (Menu Me -> Preferences-> Graphics)
EXT-783 Script editor inserts text twice when using the editors paste, or choosing LSL elements from the pull-down list.
EXT-764 mis-location of cursor in edit script panel (fixed cursor width)
EXT-658 Inventory window's "Fetched Items" needs spacing
reviewed by James
Diffstat (limited to 'indra/llui/llview.cpp')
-rw-r--r-- | indra/llui/llview.cpp | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 8d723877d6..256c776293 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -675,9 +675,13 @@ LLView* LLView::childrenHandleToolTip(S32 x, S32 y, std::string& msg, LLRect& st LLView* viewp = *child_it; S32 local_x = x - viewp->getRect().mLeft; S32 local_y = y - viewp->getRect().mBottom; - if(viewp->pointInView(local_x, local_y) && - viewp->getVisible() && - viewp->handleToolTip(local_x, local_y, msg, sticky_rect_screen) ) + if(!viewp->pointInView(local_x, local_y) || + !viewp->getVisible()) + { + continue; + } + + if(viewp->handleToolTip(local_x, local_y, msg, sticky_rect_screen) ) { if (sDebugMouseHandling) { @@ -687,17 +691,22 @@ LLView* LLView::childrenHandleToolTip(S32 x, S32 y, std::string& msg, LLRect& st handled_view = viewp; break; } + + if( viewp->blockMouseEvent(x, y) ) + { + handled_view = viewp; + } } return handled_view; } BOOL LLView::handleToolTip(S32 x, S32 y, std::string& msg, LLRect& sticky_rect_screen) { - LLView* child_handler = childrenHandleToolTip(x, y, msg, sticky_rect_screen); - BOOL handled = child_handler != NULL; + BOOL handled = FALSE; - // child widgets get priority on tooltips - if (!handled && !mToolTipMsg.empty()) + // parents provide tooltips first, which are optionally + // overridden by children + if (!mToolTipMsg.empty()) { // allow "scrubbing" over ui by showing next tooltip immediately // if previous one was still visible @@ -712,7 +721,9 @@ BOOL LLView::handleToolTip(S32 x, S32 y, std::string& msg, LLRect& sticky_rect_s handled = TRUE; } - if( blockMouseEvent(x, y) ) + // child tooltips will override our own + LLView* child_handler = childrenHandleToolTip(x, y, msg, sticky_rect_screen); + if (child_handler) { handled = TRUE; } |