diff options
Diffstat (limited to 'indra/llui/lltexteditor.cpp')
-rw-r--r-- | indra/llui/lltexteditor.cpp | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index f8e1e33cad..7506559b98 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -26,6 +26,7 @@ #include "llclipboard.h" #include "llscrollbar.h" #include "llstl.h" +#include "llstring.h" #include "llkeyboard.h" #include "llkeywords.h" #include "llundo.h" @@ -494,8 +495,10 @@ void LLTextEditor::truncate() void LLTextEditor::setText(const LLString &utf8str) { - mUTF8Text = utf8str; - mWText = utf8str_to_wstring(utf8str); + // LLString::removeCRLF(utf8str); + mUTF8Text = utf8str_removeCRLF(utf8str); + // mUTF8Text = utf8str; + mWText = utf8str_to_wstring(mUTF8Text); mTextIsUpToDate = TRUE; truncate(); @@ -2471,6 +2474,8 @@ void LLTextEditor::redo() // virtual, from LLView void LLTextEditor::onFocusLost() { + getWindow()->allowLanguageTextInput(FALSE); + // Route menu back to the default if( gEditMenuHandler == this ) { @@ -3037,6 +3042,12 @@ void LLTextEditor::setFocus( BOOL new_state ) // Don't change anything if the focus state didn't change if (new_state == old_state) return; + // Notify early if we are loosing focus. + if (!new_state) + { + getWindow()->allowLanguageTextInput(FALSE); + } + LLUICtrl::setFocus( new_state ); if( new_state ) @@ -3057,6 +3068,12 @@ void LLTextEditor::setFocus( BOOL new_state ) endSelection(); } + + // Notify late if we are gaining focus. + if (new_state && !mReadOnly) + { + getWindow()->allowLanguageTextInput(TRUE); + } } BOOL LLTextEditor::acceptsTextInput() const |