diff options
author | Erik Kundiman <erik@megapahit.org> | 2024-10-22 19:25:17 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2024-10-22 19:25:17 +0800 |
commit | 10a6a3e24b3be3d0110a189375b271cdf60e3430 (patch) | |
tree | bd52e4860148bae9991bff744c2b375667a1344e /indra/llui/lllineeditor.cpp | |
parent | bd496c3ec5672197c7dc142af458e6bf2374a4c7 (diff) | |
parent | 47c33b4bd2acae02b0fc3a1dc68148e84962dae4 (diff) |
Merge branch 'main' into 2024.09-ExtraFPS
Diffstat (limited to 'indra/llui/lllineeditor.cpp')
-rw-r--r-- | indra/llui/lllineeditor.cpp | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index 1f2aed48cc..66b274c33f 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -1050,25 +1050,6 @@ void LLLineEditor::addChar(const llwchar uni_char) getWindow()->hideCursorUntilMouseMove(); } -void LLLineEditor::addString(char *s, bool editing) -{ - if (hasSelection()) - deleteSelection(); - else if (LL_KIM_OVERWRITE == gKeyboard->getInsertMode()) { - if (!prevalidateInput(mText.getWString() - .substr(getCursor(), 1))) - return; - mText.erase(getCursor(), 1); - } else if (editing) { - mText.clear(); - setCursor(0); - } - mText.insert(getCursor(), utf8str_to_wstring(s)); - if (editing) setCursor(strlen(s)); - else setCursor(getCursor() + 1); - getWindow()->hideCursorUntilMouseMove(); -} - // Extends the selection box to the new cursor position void LLLineEditor::extendSelection( S32 new_cursor_pos ) { @@ -1739,36 +1720,6 @@ bool LLLineEditor::handleUnicodeCharHere(llwchar uni_char) return handled; } -bool LLLineEditor::handleUnicodeStringHere(char *uni_str, bool editing) -{ - auto handled = FALSE; - - if ((gFocusMgr.getKeyboardFocus() == this) - && getVisible() && !mReadOnly) { - handled = TRUE; - LLLineEditorRollback rollback(this); - - addString(uni_str, editing); - - mKeystrokeTimer.reset(); - deselect(); - auto need_to_rollback = mPrevalidator - && !mPrevalidator.validate(mText.getWString()); - - if (need_to_rollback) { - rollback.doRollback(this); - LLUI::getInstance()->reportBadKeystroke(); - mPrevalidator.showLastErrorUsingTimeout(); - } - - if (!need_to_rollback && handled) { - onKeystroke(); - mSpellCheckTimer.setTimerExpirySec(SPELLCHECK_DELAY); - } - } - - return handled; -} bool LLLineEditor::canDoDelete() const { |