diff options
| author | Leyla Farazha <leyla@lindenlab.com> | 2010-01-06 16:38:19 -0800 |
|---|---|---|
| committer | Leyla Farazha <leyla@lindenlab.com> | 2010-01-06 16:38:19 -0800 |
| commit | 35bb14951f686da538264db349f4bfbe045b8c82 (patch) | |
| tree | 31d37e3e67863aba03b2c6aef5abc5629a784e65 /indra/newview/llchatitemscontainerctrl.cpp | |
| parent | 95f14d73138a4f0eb9163fdc560a0dcad9564c4c (diff) | |
| parent | e28eac929b8d26d133be5c1953cfdd0b7d0eb9e5 (diff) | |
Merge
Diffstat (limited to 'indra/newview/llchatitemscontainerctrl.cpp')
| -rw-r--r-- | indra/newview/llchatitemscontainerctrl.cpp | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp index 92df281307..60a37ac4af 100644 --- a/indra/newview/llchatitemscontainerctrl.cpp +++ b/indra/newview/llchatitemscontainerctrl.cpp @@ -253,10 +253,32 @@ void LLNearbyChatToastPanel::onMouseEnter (S32 x, S32 y, MASK mask) BOOL LLNearbyChatToastPanel::handleMouseDown (S32 x, S32 y, MASK mask) { + return LLPanel::handleMouseDown(x,y,mask); +} + +BOOL LLNearbyChatToastPanel::handleMouseUp (S32 x, S32 y, MASK mask) +{ if(mSourceType != CHAT_SOURCE_AGENT) - return LLPanel::handleMouseDown(x,y,mask); + return LLPanel::handleMouseUp(x,y,mask); + + LLChatMsgBox* text_box = getChild<LLChatMsgBox>("msg_text", false); + S32 local_x = x - text_box->getRect().mLeft; + S32 local_y = y - text_box->getRect().mBottom; + + //if text_box process mouse up (ussually this is click on url) - we didn't show nearby_chat. + if (text_box->pointInView(local_x, local_y) ) + { + if (text_box->handleMouseUp(local_x,local_y,mask) == TRUE) + return TRUE; + else + { + LLFloaterReg::showInstance("nearby_chat",LLSD()); + return FALSE; + } + } + LLFloaterReg::showInstance("nearby_chat",LLSD()); - return LLPanel::handleMouseDown(x,y,mask); + return LLPanel::handleMouseUp(x,y,mask); } void LLNearbyChatToastPanel::setHeaderVisibility(EShowItemHeader e) |
