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:
@@ -468,6 +468,7 @@ BOOL LLFloaterIMPanel::postBuild()
|
||||
|
||||
mInputEditor = getChild<LLLineEditor>("chat_editor");
|
||||
mInputEditor->setAutoreplaceCallback(boost::bind(&LLAutoReplace::autoreplaceCallback, LLAutoReplace::getInstance(), _1, _2, _3, _4, _5));
|
||||
mInputEditor->setFocusReceivedCallback( boost::bind(&LLFloaterIMPanel::onInputEditorFocusReceived, this) );
|
||||
mFocusLostSignal = mInputEditor->setFocusLostCallback(boost::bind(&LLFloaterIMPanel::setTyping, this, false));
|
||||
mInputEditor->setKeystrokeCallback( boost::bind(&LLFloaterIMPanel::onInputEditorKeystroke, this, _1) );
|
||||
mInputEditor->setCommitCallback( boost::bind(&LLFloaterIMPanel::onSendMsg,this) );
|
||||
@@ -1027,6 +1028,12 @@ void LLFloaterIMPanel::onClickToggleActiveSpeakers(const LLSD& value)
|
||||
childSetVisible("active_speakers_panel", !value);
|
||||
}
|
||||
|
||||
void LLFloaterIMPanel::onInputEditorFocusReceived()
|
||||
{
|
||||
if (gSavedSettings.getBOOL("LiruLegacyScrollToEnd"))
|
||||
mHistoryEditor->setCursorAndScrollToEnd();
|
||||
}
|
||||
|
||||
void LLFloaterIMPanel::onInputEditorKeystroke(LLLineEditor* caller)
|
||||
{
|
||||
// Deleting all text counts as stopping typing.
|
||||
|
||||
Reference in New Issue
Block a user