summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
authorGilbert Gonzales <gilbert@lindenlab.com>2012-10-17 15:27:39 -0700
committerGilbert Gonzales <gilbert@lindenlab.com>2012-10-17 15:27:39 -0700
commitc320b4878ae9cd166594285a88437f0d5c333353 (patch)
treed4b8f11a01bfbeb30cd8e8de96e8c12a1364ff47 /indra/newview/llviewerwindow.cpp
parent3ee73ee98d31e572e284371074b7cd4744005a29 (diff)
parent33bd704c58fa707d0a4cc89216538c9d64d6e109 (diff)
merging in latest code
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rwxr-xr-xindra/newview/llviewerwindow.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 11fe8fda26..4e37a9043d 100755
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -2561,9 +2561,16 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
// If "Pressing letter keys starts local chat" option is selected, we are not in mouselook,
// no view has keyboard focus, this is a printable character key (and no modifier key is
// pressed except shift), then give focus to nearby chat (STORM-560)
- if ( nearby_chat && gSavedSettings.getS32("LetterKeysFocusChatBar") && !gAgentCamera.cameraMouselook() &&
+ if ( gSavedSettings.getS32("LetterKeysFocusChatBar") && !gAgentCamera.cameraMouselook() &&
!keyboard_focus && key < 0x80 && (mask == MASK_NONE || mask == MASK_SHIFT) )
{
+ // Initialize nearby chat if it's missing
+ if (!nearby_chat)
+ {
+ LLSD name("im_container");
+ LLFloaterReg::toggleInstanceOrBringToFront(name);
+ }
+
LLChatEntry* chat_editor = LLFloaterReg::findTypedInstance<LLNearbyChat>("nearby_chat")->getChatBox();
if (chat_editor)
{