Skip to content
Snippets Groups Projects
Commit 4458986c authored by Merov Linden's avatar Merov Linden
Browse files

CHUI-705 : Fixed! Force hide context menu when deleting line editor widget

parent e42e6bc6
No related branches found
No related tags found
No related merge requests found
...@@ -202,6 +202,14 @@ LLLineEditor::LLLineEditor(const LLLineEditor::Params& p) ...@@ -202,6 +202,14 @@ LLLineEditor::LLLineEditor(const LLLineEditor::Params& p)
LLLineEditor::~LLLineEditor() LLLineEditor::~LLLineEditor()
{ {
mCommitOnFocusLost = FALSE; 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 // calls onCommit() while LLLineEditor still valid
gFocusMgr.releaseFocusIfNeeded( this ); gFocusMgr.releaseFocusIfNeeded( this );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment