Skip to content
Snippets Groups Projects
Commit 0782f64b authored by Yuri Chebotarev's avatar Yuri Chebotarev
Browse files

fix for normal EXT-3763 URL clicked on nearby chat toast opens chat history, not URL in browser.

also move real action from mouse_down to mouse_up (since clicking on url is processing in mouse_up).

--HG--
branch : product-engine
parent e673fdea
No related branches found
No related tags found
No related merge requests found
...@@ -252,11 +252,33 @@ void LLNearbyChatToastPanel::onMouseEnter (S32 x, S32 y, MASK mask) ...@@ -252,11 +252,33 @@ void LLNearbyChatToastPanel::onMouseEnter (S32 x, S32 y, MASK mask)
} }
BOOL LLNearbyChatToastPanel::handleMouseDown (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) 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()); LLFloaterReg::showInstance("nearby_chat",LLSD());
return LLPanel::handleMouseDown(x,y,mask); return LLPanel::handleMouseUp(x,y,mask);
} }
void LLNearbyChatToastPanel::setHeaderVisibility(EShowItemHeader e) void LLNearbyChatToastPanel::setHeaderVisibility(EShowItemHeader e)
......
...@@ -68,6 +68,7 @@ class LLNearbyChatToastPanel: public LLToastPanelBase ...@@ -68,6 +68,7 @@ class LLNearbyChatToastPanel: public LLToastPanelBase
void onMouseLeave (S32 x, S32 y, MASK mask); void onMouseLeave (S32 x, S32 y, MASK mask);
void onMouseEnter (S32 x, S32 y, MASK mask); void onMouseEnter (S32 x, S32 y, MASK mask);
BOOL handleMouseDown (S32 x, S32 y, MASK mask); BOOL handleMouseDown (S32 x, S32 y, MASK mask);
BOOL handleMouseUp (S32 x, S32 y, MASK mask);
virtual BOOL postBuild(); virtual BOOL postBuild();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment