diff options
| author | Oz Linden <oz@lindenlab.com> | 2013-04-01 14:24:01 -0400 |
|---|---|---|
| committer | Oz Linden <oz@lindenlab.com> | 2013-04-01 14:24:01 -0400 |
| commit | 2fde4a9ae55a8641a5a7a9091af4d598b7e8d847 (patch) | |
| tree | 1ffa1f6a643579fd32da5fc241f03a5fdd2cbf42 /indra/llui/lllineeditor.cpp | |
| parent | e42142005585f580d39036fba02ec060d739cc5f (diff) | |
| parent | 7333731bbca764fdac87173fa5a6e5f2bb46c1d2 (diff) | |
merge changes for 3.5.0-beta7
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(); } |
