summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
authorAlexanderP ProductEngine <apaschenko@productengine.com>2012-08-31 16:52:50 +0300
committerAlexanderP ProductEngine <apaschenko@productengine.com>2012-08-31 16:52:50 +0300
commitae2e611dfb7b712c159ebafabb83ebbc1f7465b6 (patch)
treef6cb9729370f3836995b809b6d57aff9fe236fa0 /indra/newview/llviewerwindow.cpp
parente271c47994fc9dd86bda9d6ad7e79799229e52aa (diff)
CHUI-315 (Nearby chat messages do not appear in conversation floater): cancelled inheritance LLNearbyChat from LLSingleton; set mSingleInstance flag for it.
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rwxr-xr-xindra/newview/llviewerwindow.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 23d2b1633d..791cadaee4 100755
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -2493,12 +2493,14 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
return TRUE;
}
+ LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat");
+
// Traverses up the hierarchy
if( keyboard_focus )
{
- if (LLNearbyChat::instanceExists())
+ if (nearby_chat)
{
- LLChatEntry* chat_editor = LLNearbyChat::instance().getChatBox();
+ LLChatEntry* chat_editor = nearby_chat->getChatBox();
// arrow keys move avatar while chatting hack
if (chat_editor && chat_editor->hasFocus())
@@ -2562,11 +2564,11 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
if ( gSavedSettings.getS32("LetterKeysFocusChatBar") && !gAgentCamera.cameraMouselook() &&
!keyboard_focus && key < 0x80 && (mask == MASK_NONE || mask == MASK_SHIFT) )
{
- LLChatEntry* chat_editor = LLNearbyChat::instance().getChatBox();
+ LLChatEntry* chat_editor = nearby_chat->getChatBox();
if (chat_editor)
{
// passing NULL here, character will be added later when it is handled by character handler.
- LLNearbyChat::instance().startChat(NULL);
+ nearby_chat->startChat(NULL);
return TRUE;
}
}