From bf3dbd66b848fbd000b2b562b7ead4f7d3399df9 Mon Sep 17 00:00:00 2001 From: Shyotl Date: Wed, 15 Jun 2016 23:22:10 -0500 Subject: [PATCH] Fix rlva force-detach crash, and autoresponse message setting not being updated. --- indra/llui/lltexteditor.cpp | 38 ---------------------------- indra/llui/lltexteditor.h | 1 - indra/newview/llviewertexteditor.cpp | 4 +++ indra/newview/rlvhelper.cpp | 2 +- 4 files changed, 5 insertions(+), 40 deletions(-) diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 208cb1ed4..5b21a4de9 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -4792,44 +4792,6 @@ LLXMLNodePtr LLTextEditor::getXML(bool save_children) const return node; } -// static -LLView* LLTextEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory) -{ - LLRect rect; - createRect(node, rect, parent, LLRect()); - - U32 max_text_length = 255; - node->getAttributeU32("max_length", max_text_length); - - BOOL allow_embedded_items; - node->getAttributeBOOL("embedded_items", allow_embedded_items); - - LLFontGL* font = LLView::selectFont(node); - - std::string text = node->getTextContents().substr(0, max_text_length - 1); - - LLTextEditor* text_editor = new LLTextEditor("text_editor", - rect, - max_text_length, - text, - font, - allow_embedded_items); - - text_editor->setTextEditorParameters(node); - - BOOL hide_scrollbar = FALSE; - node->getAttributeBOOL("hide_scrollbar",hide_scrollbar); - text_editor->setHideScrollbarForShortDocs(hide_scrollbar); - - BOOL commit_on_focus_lost = FALSE; - node->getAttributeBOOL("commit_on_focus_lost",commit_on_focus_lost); - text_editor->setCommitOnFocusLost(commit_on_focus_lost); - - text_editor->initFromXML(node, parent); - - return text_editor; -} - void LLTextEditor::setTextEditorParameters(LLXMLNodePtr node) { BOOL word_wrap = FALSE; diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h index 7f68c41f8..3bfdfb6d6 100644 --- a/indra/llui/lltexteditor.h +++ b/indra/llui/lltexteditor.h @@ -76,7 +76,6 @@ public: void setKeystrokeCallback(const keystroke_signal_t::slot_type& callback); virtual LLXMLNodePtr getXML(bool save_children = true) const; - static LLView* fromXML(LLXMLNodePtr node, LLView *parent, class LLUICtrlFactory *factory); void setTextEditorParameters(LLXMLNodePtr node); void setParseHTML(BOOL parsing) {mParseHTML=parsing;} void setParseHighlights(BOOL parsing) {mParseHighlights=parsing;} diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index 32d2f70af..d646a2b83 100644 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -1672,6 +1672,10 @@ LLView* LLViewerTextEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlF text_editor->setParseHTML(parse_html); text_editor->setParseHighlights(TRUE); + BOOL commit_on_focus_lost = FALSE; + node->getAttributeBOOL("commit_on_focus_lost",commit_on_focus_lost); + text_editor->setCommitOnFocusLost(commit_on_focus_lost); + text_editor->initFromXML(node, parent); // add text after all parameters have been set diff --git a/indra/newview/rlvhelper.cpp b/indra/newview/rlvhelper.cpp index 370e734a5..92055cbde 100644 --- a/indra/newview/rlvhelper.cpp +++ b/indra/newview/rlvhelper.cpp @@ -192,7 +192,7 @@ RlvCommandOptionGeneric::RlvCommandOptionGeneric(const std::string& strOption): LLWearableType::EType wtType(LLWearableType::WT_INVALID); LLUUID idOption; ERlvAttachGroupType eAttachGroup(RLV_ATTACHGROUP_INVALID); LLViewerJointAttachment* pAttachPt = NULL; LLViewerInventoryCategory* pFolder = NULL; - if (!(m_fEmpty == strOption.empty())) //