summaryrefslogtreecommitdiff
path: root/indra/newview/llchatbar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llchatbar.cpp')
-rw-r--r--indra/newview/llchatbar.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp
index d6b2a9e28e..9138ad2644 100644
--- a/indra/newview/llchatbar.cpp
+++ b/indra/newview/llchatbar.cpp
@@ -553,15 +553,17 @@ void LLChatBar::onInputEditorGainFocus( LLFocusableElement* caller, void* userda
// static
void LLChatBar::onClickSay( LLUICtrl* ctrl, void* userdata )
{
- LLChatBar* self = (LLChatBar*) userdata;
+ e_chat_type chat_type = CHAT_TYPE_NORMAL;
if (ctrl->getValue().asString() == "shout")
{
- self->sendChat( CHAT_TYPE_SHOUT );
+ chat_type = CHAT_TYPE_SHOUT;
}
- else
+ else if (ctrl->getValue().asString() == "whisper")
{
- self->sendChat( CHAT_TYPE_NORMAL );
+ chat_type = CHAT_TYPE_WHISPER;
}
+ LLChatBar* self = (LLChatBar*) userdata;
+ self->sendChat(chat_type);
}
void LLChatBar::sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate)