Introduce a setting for Automatically scrolling to the bottom of a chat when the chat gains focus

Preferences->Adv. Chat->Chat UI, Autoscroll to the end of chats when they regain focus.
This defaults to false, unlike the legacy behavior.

Partial revert of "Feature Removal!: Do not scroll to the end of chats when the corresponding chatbar regains focus!"
This commit is contained in:
Inusaito Sayori
2014-05-22 19:46:15 -04:00
parent 852a8407c8
commit dadbb00b85
10 changed files with 48 additions and 0 deletions

View File

@@ -333,6 +333,20 @@ void LLFloaterChat::addChatHistory(const LLChat& chat, bool log_to_file)
}
}
// static
void LLFloaterChat::setHistoryCursorAndScrollToEnd()
{
if (LLViewerTextEditor* editor = getInstance()->findChild<LLViewerTextEditor>("Chat History Editor"))
{
editor->setCursorAndScrollToEnd();
}
if (LLViewerTextEditor* editor = getInstance()->findChild<LLViewerTextEditor>("Chat History Editor with mute"))
{
editor->setCursorAndScrollToEnd();
}
}
//static
void LLFloaterChat::onClickMute(void *data)
{