From c272809aa6e52873c842b79ae47832ddf41dfcdb Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 27 May 2013 14:31:08 +0300 Subject: CHUI-867 FIXED Set focus to Session floater(if it is torn off) after clicking appropriate conversation item. --- indra/newview/llconversationview.cpp | 18 ++++++++++++++++++ indra/newview/llconversationview.h | 1 + 2 files changed, 19 insertions(+) diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 42104ea20a..0695337241 100755 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -270,6 +270,24 @@ BOOL LLConversationViewSession::handleMouseDown( S32 x, S32 y, MASK mask ) return result; } +BOOL LLConversationViewSession::handleMouseUp( S32 x, S32 y, MASK mask ) +{ + BOOL result = LLFolderViewFolder::handleMouseUp(x, y, mask); + + if(result && getRoot()) + { + LLConversationItem* item = dynamic_cast(getViewModelItem()); + LLUUID session_id = item? item->getUUID() : LLUUID(); + LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::findConversation(session_id); + if(!session_floater->getHost() && !session_floater->hasFocus()) + { + session_floater->setFocus(true); + } + } + + return result; +} + BOOL LLConversationViewSession::handleRightMouseDown( S32 x, S32 y, MASK mask ) { BOOL result = LLFolderViewFolder::handleRightMouseDown(x, y, mask); diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h index 879d496dc7..5a74974302 100755 --- a/indra/newview/llconversationview.h +++ b/indra/newview/llconversationview.h @@ -69,6 +69,7 @@ public: /*virtual*/ void draw(); /*virtual*/ BOOL handleMouseDown( S32 x, S32 y, MASK mask ); /*virtual*/ BOOL handleRightMouseDown( S32 x, S32 y, MASK mask ); + /*virtual*/ BOOL handleMouseUp( S32 x, S32 y, MASK mask ); /*virtual*/ S32 arrange(S32* width, S32* height); -- cgit v1.2.3