summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimnearbychat.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterimnearbychat.cpp')
-rw-r--r--indra/newview/llfloaterimnearbychat.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp
index b287950c21..d86e1b3fd7 100644
--- a/indra/newview/llfloaterimnearbychat.cpp
+++ b/indra/newview/llfloaterimnearbychat.cpp
@@ -283,6 +283,11 @@ void LLFloaterIMNearbyChat::onTearOffClicked()
void LLFloaterIMNearbyChat::onOpen(const LLSD& key)
{
LLFloaterIMSessionTab::onOpen(key);
+ if(!isMessagePaneExpanded())
+ {
+ restoreFloater();
+ onCollapseToLine(this);
+ }
showTranslationCheckbox(LLTranslate::isTranslationConfigured());
}
@@ -322,11 +327,8 @@ void LLFloaterIMNearbyChat::onChatFontChange(LLFontGL* fontp)
void LLFloaterIMNearbyChat::show()
{
- if (isChatMultiTab())
- {
openFloater(getKey());
}
-}
bool LLFloaterIMNearbyChat::isChatVisible() const
{
@@ -480,11 +482,14 @@ void LLFloaterIMNearbyChat::onChatBoxKeystroke()
if (LLGestureMgr::instance().matchPrefix(utf8_trigger, &utf8_out_str))
{
std::string rest_of_match = utf8_out_str.substr(utf8_trigger.size());
- mInputEditor->setText(utf8_trigger + rest_of_match); // keep original capitalization for user-entered part
+ if (!rest_of_match.empty())
+ {
+ mInputEditor->setText(utf8_trigger + rest_of_match); // keep original capitalization for user-entered part
- // Select to end of line, starting from the character
- // after the last one the user typed.
- mInputEditor->selectNext(rest_of_match, false);
+ // Select to end of line, starting from the character
+ // after the last one the user typed.
+ mInputEditor->selectNext(rest_of_match, false);
+ }
}
else if (matchChatTypeTrigger(utf8_trigger, &utf8_out_str))
{
@@ -741,15 +746,14 @@ void LLFloaterIMNearbyChat::startChat(const char* line)
{
if(!nearby_chat->isTornOff())
{
- nearby_chat->show();
+ LLFloaterIMContainer::getInstance()->selectConversation(LLUUID(NULL));
}
if(nearby_chat->isMinimized())
{
nearby_chat->setMinimized(false);
}
- nearby_chat->setVisible(TRUE);
+ nearby_chat->show();
nearby_chat->setFocus(TRUE);
- nearby_chat->mInputEditor->setFocus(TRUE);
if (line)
{