When LLTextEditor calls onCommit, update its setting value if applicable.

Hook up commit on focus lost, too, have the autoresponse messages do that.
This commit is contained in:
Lirusaito
2016-06-12 15:52:20 -04:00
parent e486b9b1e8
commit a41ce2d281
2 changed files with 9 additions and 4 deletions

View File

@@ -362,6 +362,7 @@ LLTextEditor::LLTextEditor(
menu->setCanTearOff(FALSE);
menu->setVisible(FALSE);
mPopupMenuHandle = menu->getHandle();
setCommitCallback(boost::bind(&LLTextEditor::setControlValue, this, _2));
}
@@ -4820,6 +4821,10 @@ LLView* LLTextEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory
node->getAttributeBOOL("hide_scrollbar",hide_scrollbar);
text_editor->setHideScrollbarForShortDocs(hide_scrollbar);
BOOL commit_on_focus_lost = FALSE;
node->getAttributeBOOL("commit_on_focus_lost",commit_on_focus_lost);
text_editor->setCommitOnFocusLost(commit_on_focus_lost);
text_editor->initFromXML(node, parent);
return text_editor;