LLTextEditor's setText and setWText shouldn't always enforce linking

This commit is contained in:
Lirusaito
2019-05-10 16:45:20 -04:00
parent e9c99089e1
commit 2a40ca6295
2 changed files with 6 additions and 6 deletions

View File

@@ -741,7 +741,7 @@ LLMenuGL* LLTextEditor::createUrlContextMenu(S32 x, S32 y, const std::string &in
return menu;
}
void LLTextEditor::setText(const LLStringExplicit &utf8str)
void LLTextEditor::setText(const LLStringExplicit &utf8str, bool force_replace_links)
{
// clear out the existing text and segments
mWText.clear();
@@ -756,7 +756,7 @@ void LLTextEditor::setText(const LLStringExplicit &utf8str)
//LLStringUtil::removeCRLF(text);
// appendText modifies mCursorPos...
appendText(utf8str, false, false);
appendText(utf8str, false, false, nullptr, force_replace_links);
// ...so move cursor to top after appending text
setCursorPos(0);
@@ -766,9 +766,9 @@ void LLTextEditor::setText(const LLStringExplicit &utf8str)
mTextIsUpToDate = true;
}
void LLTextEditor::setWText(const LLWString& text)
void LLTextEditor::setWText(const LLWString& text, bool force_replace_links)
{
setText(wstring_to_utf8str(text));
setText(wstring_to_utf8str(text), force_replace_links);
}
// virtual