summaryrefslogtreecommitdiff
path: root/indra/llui/lllineeditor.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2013-06-19 13:59:52 -0400
committerOz Linden <oz@lindenlab.com>2013-06-19 13:59:52 -0400
commite23228fef2834587af490d0345f29212445666d8 (patch)
treedfa761027aca1227ec1817707f8141b833c061df /indra/llui/lllineeditor.cpp
parentc880c961bb2a0838bc529efc07cfeb12f5636d88 (diff)
parent8a330ee2eb1008951f5e5159057fa5736dd805b4 (diff)
merge 3.5.0-release
Diffstat (limited to 'indra/llui/lllineeditor.cpp')
-rw-r--r--indra/llui/lllineeditor.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp
index 48d49af588..6976b06a92 100644
--- a/indra/llui/lllineeditor.cpp
+++ b/indra/llui/lllineeditor.cpp
@@ -157,8 +157,7 @@ LLLineEditor::LLLineEditor(const LLLineEditor::Params& p)
mHighlightColor(p.highlight_color()),
mPreeditBgColor(p.preedit_bg_color()),
mGLFont(p.font),
- mContextMenuHandle(),
- mAutoreplaceCallback()
+ mContextMenuHandle()
{
llassert( mMaxLengthBytes > 0 );
@@ -203,6 +202,14 @@ LLLineEditor::LLLineEditor(const LLLineEditor::Params& p)
LLLineEditor::~LLLineEditor()
{
mCommitOnFocusLost = FALSE;
+
+ // Make sure no context menu linger around once the widget is deleted
+ LLContextMenu* menu = static_cast<LLContextMenu*>(mContextMenuHandle.get());
+ if (menu)
+ {
+ menu->hide();
+ }
+ setContextMenu(NULL);
// calls onCommit() while LLLineEditor still valid
gFocusMgr.releaseFocusIfNeeded( this );
@@ -971,12 +978,6 @@ void LLLineEditor::addChar(const llwchar uni_char)
LLUI::reportBadKeystroke();
}
- if (!mReadOnly && mAutoreplaceCallback != NULL)
- {
- // call callback
- mAutoreplaceCallback(mText, mCursorPos);
- }
-
getWindow()->hideCursorUntilMouseMove();
}