LineEditor: Automatically hide spell check separator when it's not in use

That's the line that likes to linger beneath the menu, looking dumb
so now it won't, yay!
This commit is contained in:
Liru Færs
2019-12-28 02:55:38 -05:00
parent 36025384f4
commit 19bcdae6ac

View File

@@ -181,7 +181,6 @@ LLLineEditor::LLLineEditor(const std::string& name, const LLRect& rect,
// make the popup menu available
LLMenuGL* menu = LLUICtrlFactory::getInstance()->buildMenu("menu_texteditor.xml", LLMenuGL::sMenuContainer);
menu->addSeparator();
//menu->setBackgroundColor(gColors.getColor("MenuPopupBgColor"));
menu->setCanTearOff(FALSE);
menu->setVisible(FALSE);
@@ -3014,6 +3013,8 @@ void LLLineEditor::showContextMenu(S32 x, S32 y)
// spell_check="true" in xui
if (!mReadOnly && mSpellCheckable)
{
constexpr auto spell_sep = "Spell Check Sep";
menu->addSeparator(spell_sep);
// search for word matches
S32 wordStart = 0;