diff options
Diffstat (limited to 'linden/indra/llui/lltexteditor.cpp')
-rw-r--r-- | linden/indra/llui/lltexteditor.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp index 28859b1..8612427 100644 --- a/linden/indra/llui/lltexteditor.cpp +++ b/linden/indra/llui/lltexteditor.cpp | |||
@@ -389,14 +389,12 @@ LLTextEditor::LLTextEditor( | |||
389 | LLMenuGL* menu = LLUICtrlFactory::getInstance()->buildMenu("menu_rightclick_text.xml",this); | 389 | LLMenuGL* menu = LLUICtrlFactory::getInstance()->buildMenu("menu_rightclick_text.xml",this); |
390 | if (!menu) | 390 | if (!menu) |
391 | { | 391 | { |
392 | menu = new LLMenuGL(LLStringUtil::null); | 392 | menu = new LLMenuGL(LLStringUtil::null); |
393 | } | 393 | } |
394 | 394 | ||
395 | defineMenuCallbacks(menu); | 395 | defineMenuCallbacks(menu); |
396 | mPopupMenuHandle = menu->getHandle(); | 396 | mPopupMenuHandle = menu->getHandle(); |
397 | menu->setBorderColor(gColors.getColor("MenuItemDisabledColor")); | ||
398 | menu->setBackgroundColor(gColors.getColor("MenuPopupBgColor")); | 397 | menu->setBackgroundColor(gColors.getColor("MenuPopupBgColor")); |
399 | |||
400 | } | 398 | } |
401 | 399 | ||
402 | LLTextEditor::~LLTextEditor() | 400 | LLTextEditor::~LLTextEditor() |
@@ -636,7 +634,7 @@ void LLTextEditor::defineMenuCallbacks(LLMenuGL* menu) { | |||
636 | "Select All Text", | 634 | "Select All Text", |
637 | this, | 635 | this, |
638 | (void*)context_enable_selectall); | 636 | (void*)context_enable_selectall); |
639 | menu->setCtrlResponse(1+LLCallbackInformation::LL_MENU_ITEM_CALL_GL_ON_CLICK, | 637 | menu->setCtrlResponse(LLCallbackInformation::LL_MENU_ITEM_CALL_GL_ON_CLICK, |
640 | "Select All Text", | 638 | "Select All Text", |
641 | this, | 639 | this, |
642 | (void*)context_selectall); | 640 | (void*)context_selectall); |
@@ -3869,6 +3867,12 @@ void LLTextEditor::onTabInto() | |||
3869 | // virtual | 3867 | // virtual |
3870 | void LLTextEditor::clear() | 3868 | void LLTextEditor::clear() |
3871 | { | 3869 | { |
3870 | // Also clear any styling we might have added -- MC | ||
3871 | mParseHTML = FALSE; | ||
3872 | mParseHighlights = FALSE; | ||
3873 | |||
3874 | mSegments.clear(); | ||
3875 | |||
3872 | setText(LLStringUtil::null); | 3876 | setText(LLStringUtil::null); |
3873 | std::for_each(mSegments.begin(), mSegments.end(), DeletePointer()); | 3877 | std::for_each(mSegments.begin(), mSegments.end(), DeletePointer()); |
3874 | mSegments.clear(); | 3878 | mSegments.clear(); |