From bc5e0eda1b1b9c289734bebe6a533565aadfd3a2 Mon Sep 17 00:00:00 2001 From: AlexanderP ProductEngine Date: Mon, 18 Jun 2012 21:11:56 +0300 Subject: CHUI-119 fixed bug with creating multiply instances of the nearby chat; --- indra/newview/llimfloatercontainer.cpp | 3 +-- indra/newview/llnearbychat.cpp | 6 +----- indra/newview/llviewerwindow.cpp | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index af5d587f20..8493a0e7b8 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -96,8 +96,7 @@ void LLIMFloaterContainer::onOpen(const LLSD& key) // If there's *no* conversation open so far, we force the opening of the nearby chat conversation // *TODO: find a way to move this to XML as a default panel or something like that LLSD name("chat_bar"); - LLSD key(""); - LLFloaterReg::toggleInstanceOrBringToFront(name,key); + LLFloaterReg::toggleInstanceOrBringToFront(name); } /* if (key.isDefined()) diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index fbaf451412..e4b891889c 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -130,6 +130,7 @@ LLNearbyChat::LLNearbyChat(const LLSD& key) mSpeakerMgr(NULL), mExpandedHeight(COLLAPSED_HEIGHT + EXPANDED_HEIGHT) { + mKey = LLSD(); mIsNearbyChat = true; mSpeakerMgr = LLLocalSpeakerMgr::getInstance(); } @@ -382,11 +383,6 @@ LLNearbyChat* LLNearbyChat::getInstance() return LLFloaterReg::getTypedInstance("chat_bar"); } -//static -//LLNearbyChat* LLNearbyChat::findInstance() -//{ -// return LLFloaterReg::findTypedInstance("chat_bar"); -//} void LLNearbyChat::showHistory() { diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 7f14e021fd..016da1d994 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2555,7 +2555,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) if ( gSavedSettings.getS32("LetterKeysFocusChatBar") && !gAgentCamera.cameraMouselook() && !keyboard_focus && key < 0x80 && (mask == MASK_NONE || mask == MASK_SHIFT) ) { - LLLineEditor* chat_editor = LLFloaterReg::getTypedInstance("chat_bar")->getChatBox(); + LLLineEditor* chat_editor = LLNearbyChat::getInstance()->getChatBox(); if (chat_editor) { // passing NULL here, character will be added later when it is handled by character handler. -- cgit v1.2.3