summaryrefslogtreecommitdiff
path: root/indra/llui/lllineeditor.cpp
diff options
context:
space:
mode:
authorCallum Prentice <callum@lindenlab.com>2023-02-13 14:12:59 -0800
committerCallum Prentice <callum@lindenlab.com>2023-02-13 14:12:59 -0800
commit422cd237dff521b35521292a8fccca61eaece23a (patch)
treeec275907b06d8839b2c6f984a0c7ad11719efc77 /indra/llui/lllineeditor.cpp
parentf3cd329b585ef55a66f2a824f010d1a54d67d8d2 (diff)
parent8d21d29bd7fa038db632ff90fb0e1207d0713ca2 (diff)
Fix up a couple of tiny merge conflicts after a merge with main
Diffstat (limited to 'indra/llui/lllineeditor.cpp')
-rw-r--r--indra/llui/lllineeditor.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp
index 33037b5001..940cf398c0 100644
--- a/indra/llui/lllineeditor.cpp
+++ b/indra/llui/lllineeditor.cpp
@@ -209,13 +209,6 @@ LLLineEditor::LLLineEditor(const LLLineEditor::Params& p)
setPrevalidateInput(p.prevalidate_input_callback());
setPrevalidate(p.prevalidate_callback());
-
- llassert(LLMenuGL::sMenuContainer != NULL);
- LLContextMenu* menu = LLUICtrlFactory::instance().createFromFile<LLContextMenu>
- ("menu_text_editor.xml",
- LLMenuGL::sMenuContainer,
- LLMenuHolderGL::child_registry_t::instance());
- setContextMenu(menu);
}
LLLineEditor::~LLLineEditor()
@@ -1567,7 +1560,7 @@ BOOL LLLineEditor::handleKeyHere(KEY key, MASK mask )
KEY_SHIFT != key &&
KEY_CONTROL != key &&
KEY_ALT != key &&
- KEY_CAPSLOCK )
+ KEY_CAPSLOCK != key)
{
deselect();
}
@@ -2637,6 +2630,15 @@ LLWString LLLineEditor::getConvertedText() const
void LLLineEditor::showContextMenu(S32 x, S32 y)
{
LLContextMenu* menu = static_cast<LLContextMenu*>(mContextMenuHandle.get());
+ if (!menu)
+ {
+ llassert(LLMenuGL::sMenuContainer != NULL);
+ menu = LLUICtrlFactory::createFromFile<LLContextMenu>
+ ("menu_text_editor.xml",
+ LLMenuGL::sMenuContainer,
+ LLMenuHolderGL::child_registry_t::instance());
+ setContextMenu(menu);
+ }
if (menu)
{