From 1adfaa081fd27d653619c84c520c16516c530ab1 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 1 Jun 2016 16:56:04 +0300 Subject: MAINT-6446 Correct password length handling --- indra/llui/lllineeditor.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'indra/llui/lllineeditor.cpp') diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index a08cf91a69..492c9315d1 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -400,12 +400,7 @@ void LLLineEditor::setText(const LLStringExplicit &new_text) if (mMaxLengthChars) { - LLWString truncated_wstring = utf8str_to_wstring(truncated_utf8); - if (truncated_wstring.size() > (U32)mMaxLengthChars) - { - truncated_wstring = truncated_wstring.substr(0, mMaxLengthChars); - } - mText.assign(wstring_to_utf8str(truncated_wstring)); + mText.assign(utf8str_symbol_truncate(truncated_utf8, mMaxLengthChars)); } if (all_selected) -- cgit v1.2.3 From da23e0f925742045013fc09e75b962c65e1cda88 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 13 Sep 2016 20:32:34 +0300 Subject: MAINT-6726 Fixed LLLineEditor menus staying in memory forever --- indra/llui/lllineeditor.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'indra/llui/lllineeditor.cpp') diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index 492c9315d1..c89e1dac1d 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -2636,10 +2636,17 @@ void LLLineEditor::showContextMenu(S32 x, S32 y) void LLLineEditor::setContextMenu(LLContextMenu* new_context_menu) { - if (new_context_menu) - mContextMenuHandle = new_context_menu->getHandle(); - else - mContextMenuHandle.markDead(); + LLContextMenu* menu = static_cast(mContextMenuHandle.get()); + if (menu) + { + menu->die(); + mContextMenuHandle.markDead(); + } + + if (new_context_menu) + { + mContextMenuHandle = new_context_menu->getHandle(); + } } void LLLineEditor::setFont(const LLFontGL* font) -- cgit v1.2.3 From 6083fd1cbef478c15c49055d27270d0a6f2ddfa2 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Mon, 7 Nov 2016 12:33:14 +0200 Subject: STORM-2140 LLLineEditor enabled-state cannot properly set via XUI --- indra/llui/lllineeditor.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llui/lllineeditor.cpp') diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index c89e1dac1d..118339577a 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -335,6 +335,7 @@ void LLLineEditor::reshape(S32 width, S32 height, BOOL called_from_parent) void LLLineEditor::setEnabled(BOOL enabled) { + LLUICtrl::setEnabled(enabled); mReadOnly = !enabled; setTabStop(!mReadOnly); updateAllowingLanguageInput(); -- cgit v1.2.3 From deb8f582c56bd6035f9f2c3d57b8865a1c928936 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 16 Nov 2016 16:48:56 +0200 Subject: STORM-2140 LLLineEditor enabled-state cannot properly set via XUI --- indra/llui/lllineeditor.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/llui/lllineeditor.cpp') diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index 118339577a..fa99a19c9d 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -163,6 +163,9 @@ LLLineEditor::LLLineEditor(const LLLineEditor::Params& p) { llassert( mMaxLengthBytes > 0 ); + LLUICtrl::setEnabled(TRUE); + setEnabled(p.enabled); + mScrollTimer.reset(); mTripleClickTimer.reset(); setText(p.default_text()); @@ -335,7 +338,6 @@ void LLLineEditor::reshape(S32 width, S32 height, BOOL called_from_parent) void LLLineEditor::setEnabled(BOOL enabled) { - LLUICtrl::setEnabled(enabled); mReadOnly = !enabled; setTabStop(!mReadOnly); updateAllowingLanguageInput(); -- cgit v1.2.3 From 11c03f8fe3277313c27d5a35302c79d0d09bd670 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sat, 19 Nov 2016 16:50:02 +0100 Subject: STORM-2140 LLLineEditor enabled-state cannot properly set via XUI --- indra/llui/lllineeditor.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indra/llui/lllineeditor.cpp') diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index fa99a19c9d..becb45fa79 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -221,6 +221,13 @@ LLLineEditor::~LLLineEditor() gFocusMgr.releaseFocusIfNeeded( this ); } +void LLLineEditor::initFromParams(const LLLineEditor::Params& params) +{ + LLUICtrl::initFromParams(params); + LLUICtrl::setEnabled(TRUE); + setEnabled(params.enabled); +} + void LLLineEditor::onFocusReceived() { gEditMenuHandler = this; -- cgit v1.2.3