From 148fc99607fa7f21f5985c4b0c322070fdfd20a9 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 30 May 2014 19:24:12 +0200 Subject: [PATCH] FIRE-13898: Opening nearby chat by clicking a nearby chat toast results in multiple tabs shown simultaneously --- indra/newview/llchatitemscontainerctrl.cpp | 25 +++++++++++----------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp index 153515b826..415dbd6bcf 100755 --- a/indra/newview/llchatitemscontainerctrl.cpp +++ b/indra/newview/llchatitemscontainerctrl.cpp @@ -38,6 +38,7 @@ // [FS communication UI] //#include "llfloaterimnearbychat.h" #include "fsfloaternearbychat.h" +#include "fsfloaterimcontainer.h" // [FS communication UI] #include "llviewercontrol.h" @@ -347,13 +348,13 @@ BOOL LLFloaterIMNearbyChatToastPanel::handleMouseUp (S32 x, S32 y, MASK mask) { // [FS communication UI] //LLFloaterReg::getTypedInstance("nearby_chat")->showHistory(); - FSFloaterNearbyChat::getInstance()->setVisible(TRUE); - - // If nearby chat history is docked, we also need - // to open the container floater (FIRE-6265) - if (!gSavedSettings.getBOOL("ChatHistoryTornOff")) + if (gSavedSettings.getBOOL("ChatHistoryTornOff")) { - LLFloaterReg::showInstance("fs_im_container"); + LLFloaterReg::showInstance("fs_nearby_chat"); + } + else + { + LLFloaterReg::showTypedInstance("fs_im_container")->selectFloater(FSFloaterNearbyChat::getInstance()); } // [FS communication UI] return FALSE; @@ -362,13 +363,13 @@ BOOL LLFloaterIMNearbyChatToastPanel::handleMouseUp (S32 x, S32 y, MASK mask) // [FS communication UI] //LLFloaterReg::getTypedInstance("nearby_chat")->showHistory(); - FSFloaterNearbyChat::getInstance()->setVisible(TRUE); - - // If nearby chat history is docked, we also need - // to open the container floater (FIRE-6265) - if (!gSavedSettings.getBOOL("ChatHistoryTornOff")) + if (gSavedSettings.getBOOL("ChatHistoryTornOff")) { - LLFloaterReg::showInstance("fs_im_container"); + LLFloaterReg::showInstance("fs_nearby_chat"); + } + else + { + LLFloaterReg::showTypedInstance("fs_im_container")->selectFloater(FSFloaterNearbyChat::getInstance()); } // [FS communication UI] return LLPanel::handleMouseUp(x,y,mask);