diff options
| author | Simon Linden <simon@lindenlab.com> | 2013-03-19 16:20:53 -0700 |
|---|---|---|
| committer | Simon Linden <simon@lindenlab.com> | 2013-03-19 16:20:53 -0700 |
| commit | d5561a1ada5cf171c8e281e910a7e989496c3705 (patch) | |
| tree | 456cbb2374242d5508cc13165c876cd0672f6cd0 /indra/llui/lllineeditor.cpp | |
| parent | a8245c51b9cd6fac1d26932dbb1fcf052f00da18 (diff) | |
| parent | 04e78ce4fdd3bbc0e4daa1daabbff2de1c425601 (diff) | |
Merge in viewer-beta to get CHUI code
Diffstat (limited to 'indra/llui/lllineeditor.cpp')
| -rw-r--r-- | indra/llui/lllineeditor.cpp | 17 |
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(); } |
