diff options
Diffstat (limited to 'linden/indra/llui/lltexteditor.cpp')
-rw-r--r-- | linden/indra/llui/lltexteditor.cpp | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp index 80205d3..513670b 100644 --- a/linden/indra/llui/lltexteditor.cpp +++ b/linden/indra/llui/lltexteditor.cpp | |||
@@ -46,6 +46,7 @@ | |||
46 | #include "llclipboard.h" | 46 | #include "llclipboard.h" |
47 | #include "llscrollbar.h" | 47 | #include "llscrollbar.h" |
48 | #include "llstl.h" | 48 | #include "llstl.h" |
49 | #include "llstring.h" | ||
49 | #include "llkeyboard.h" | 50 | #include "llkeyboard.h" |
50 | #include "llkeywords.h" | 51 | #include "llkeywords.h" |
51 | #include "llundo.h" | 52 | #include "llundo.h" |
@@ -514,8 +515,10 @@ void LLTextEditor::truncate() | |||
514 | 515 | ||
515 | void LLTextEditor::setText(const LLString &utf8str) | 516 | void LLTextEditor::setText(const LLString &utf8str) |
516 | { | 517 | { |
517 | mUTF8Text = utf8str; | 518 | // LLString::removeCRLF(utf8str); |
518 | mWText = utf8str_to_wstring(utf8str); | 519 | mUTF8Text = utf8str_removeCRLF(utf8str); |
520 | // mUTF8Text = utf8str; | ||
521 | mWText = utf8str_to_wstring(mUTF8Text); | ||
519 | mTextIsUpToDate = TRUE; | 522 | mTextIsUpToDate = TRUE; |
520 | 523 | ||
521 | truncate(); | 524 | truncate(); |
@@ -2491,6 +2494,8 @@ void LLTextEditor::redo() | |||
2491 | // virtual, from LLView | 2494 | // virtual, from LLView |
2492 | void LLTextEditor::onFocusLost() | 2495 | void LLTextEditor::onFocusLost() |
2493 | { | 2496 | { |
2497 | getWindow()->allowLanguageTextInput(FALSE); | ||
2498 | |||
2494 | // Route menu back to the default | 2499 | // Route menu back to the default |
2495 | if( gEditMenuHandler == this ) | 2500 | if( gEditMenuHandler == this ) |
2496 | { | 2501 | { |
@@ -3057,6 +3062,12 @@ void LLTextEditor::setFocus( BOOL new_state ) | |||
3057 | // Don't change anything if the focus state didn't change | 3062 | // Don't change anything if the focus state didn't change |
3058 | if (new_state == old_state) return; | 3063 | if (new_state == old_state) return; |
3059 | 3064 | ||
3065 | // Notify early if we are loosing focus. | ||
3066 | if (!new_state) | ||
3067 | { | ||
3068 | getWindow()->allowLanguageTextInput(FALSE); | ||
3069 | } | ||
3070 | |||
3060 | LLUICtrl::setFocus( new_state ); | 3071 | LLUICtrl::setFocus( new_state ); |
3061 | 3072 | ||
3062 | if( new_state ) | 3073 | if( new_state ) |
@@ -3077,6 +3088,12 @@ void LLTextEditor::setFocus( BOOL new_state ) | |||
3077 | 3088 | ||
3078 | endSelection(); | 3089 | endSelection(); |
3079 | } | 3090 | } |
3091 | |||
3092 | // Notify late if we are gaining focus. | ||
3093 | if (new_state && !mReadOnly) | ||
3094 | { | ||
3095 | getWindow()->allowLanguageTextInput(TRUE); | ||
3096 | } | ||
3080 | } | 3097 | } |
3081 | 3098 | ||
3082 | BOOL LLTextEditor::acceptsTextInput() const | 3099 | BOOL LLTextEditor::acceptsTextInput() const |