diff options
author | Kelly Washington <kelly@lindenlab.com> | 2007-06-21 22:40:22 +0000 |
---|---|---|
committer | Kelly Washington <kelly@lindenlab.com> | 2007-06-21 22:40:22 +0000 |
commit | e03bb0606a10f29c8b94909a713a5bb5c69e88b7 (patch) | |
tree | 6d8d07894579438c8cc70e08f5730c3c95dfe768 /indra/llui/lltexteditor.cpp | |
parent | 2638f12f95eea692502836cf6548b4a0b234d009 (diff) |
merge -r62831:64079 branches/maintenance to release
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 |