diff options
| author | Bryan O'Sullivan <bos@lindenlab.com> | 2009-09-09 17:10:06 -0700 |
|---|---|---|
| committer | Bryan O'Sullivan <bos@lindenlab.com> | 2009-09-09 17:10:06 -0700 |
| commit | a997e131d4262f0a18a6f4f8c305c73edbfea6b6 (patch) | |
| tree | 5b7f8595e7911f4fd7ba6f2824c6b92f8478a9ef /indra/newview/lllocationinputctrl.cpp | |
| parent | cab31b572d1a3b717b7f8b9fdf2a49f0b2eb6995 (diff) | |
| parent | bbf497469c4d71d5308421f1ef06d0a2098772c8 (diff) | |
Merge with SVN viewer-2.0.0-3 branch
Diffstat (limited to 'indra/newview/lllocationinputctrl.cpp')
| -rw-r--r-- | indra/newview/lllocationinputctrl.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index f54a614f62..1d9220cf3d 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -42,6 +42,7 @@ #include "llstring.h" #include "lltrans.h" #include "lluictrlfactory.h" +#include "lltooltip.h" // newview includes #include "llinventorymodel.h" @@ -290,12 +291,13 @@ void LLLocationInputCtrl::hideList() focusTextEntry(); } -BOOL LLLocationInputCtrl::handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sticky_rect_screen) +BOOL LLLocationInputCtrl::handleToolTip(S32 x, S32 y, std::string& msg, LLRect& sticky_rect_screen) { // Let the buttons show their tooltips. if (LLUICtrl::handleToolTip(x, y, msg, sticky_rect_screen) && !msg.empty()) { - if (mList->getRect().pointInRect(x, y)) { + if (mList->getRect().pointInRect(x, y)) + { S32 loc_x, loc_y; //x,y - contain coordinates related to the location input control, but without taking the expanded list into account //So we have to convert it again into local coordinates of mList @@ -307,7 +309,7 @@ BOOL LLLocationInputCtrl::handleToolTip(S32 x, S32 y, std::string& msg, LLRect* LLSD value = item->getValue(); if (value.has("tooltip")) { - msg = value["tooltip"].asString(); + LLToolTipMgr::instance().show(value["tooltip"]); } } } @@ -315,15 +317,14 @@ BOOL LLLocationInputCtrl::handleToolTip(S32 x, S32 y, std::string& msg, LLRect* return TRUE; } - msg = LLUI::sShowXUINames ? getShowNamesToolTip() : ""; - return mTextEntry->getRect().pointInRect(x, y); + return FALSE; } BOOL LLLocationInputCtrl::handleKeyHere(KEY key, MASK mask) { BOOL result = LLComboBox::handleKeyHere(key, mask); - if (key == KEY_DOWN && hasFocus() && mList->getItemCount() != 0) + if (key == KEY_DOWN && hasFocus() && mList->getItemCount() != 0 && !mList->getVisible()) { showList(); } |
