summaryrefslogtreecommitdiff
path: root/indra/llui/lltexteditor.cpp
diff options
context:
space:
mode:
authorCho <cho@lindenlab.com>2013-01-23 20:22:28 +0000
committerCho <cho@lindenlab.com>2013-01-23 20:22:28 +0000
commit977d318ac8ccb756bb90a8572f01bc6825b5d0a3 (patch)
tree1002b1b87373951d40d6ec276ce26015f8b2bbd8 /indra/llui/lltexteditor.cpp
parent9e6677ffc29b779f7b47228cf96c5bcdc867669c (diff)
CHUI-291 FIX New auto-replace feature does not work with chui text input boxes in conversation floater
Moved autoreplace hooks from LLLineEditor to LLTextEditor, and modified LLAutoReplace accordingly
Diffstat (limited to 'indra/llui/lltexteditor.cpp')
-rw-r--r--indra/llui/lltexteditor.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index d42d6473ed..d297e54f2f 100644
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -246,7 +246,8 @@ LLTextEditor::Params::Params()
}
LLTextEditor::LLTextEditor(const LLTextEditor::Params& p) :
- LLTextBase(p),
+ LLTextBase(p),
+ mAutoreplaceCallback(),
mBaseDocIsPristine(TRUE),
mPristineCmd( NULL ),
mLastCmd( NULL ),
@@ -1097,7 +1098,14 @@ void LLTextEditor::addChar(llwchar wc)
}
setCursorPos(mCursorPos + addChar( mCursorPos, wc ));
+
+ if (!mReadOnly && mAutoreplaceCallback != NULL)
+ {
+ // call callback
+ mAutoreplaceCallback(getViewModel()->getEditableDisplay(), mCursorPos);
+ }
}
+
void LLTextEditor::addLineBreakChar()
{
if( !getEnabled() )