Permalink
Browse files

Fix rlva force-detach crash, and autoresponse message setting not bei…

…ng updated.
  • Loading branch information...
1 parent 027c3be commit bf3dbd66b848fbd000b2b562b7ead4f7d3399df9 @Shyotl Shyotl committed Jun 16, 2016
Showing with 5 additions and 40 deletions.
  1. +0 −38 indra/llui/lltexteditor.cpp
  2. +0 −1 indra/llui/lltexteditor.h
  3. +4 −0 indra/newview/llviewertexteditor.cpp
  4. +1 −1 indra/newview/rlvhelper.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;
@@ -76,7 +76,6 @@ class LLTextEditor : public LLUICtrl, LLEditMenuHandler, protected LLPreeditor
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;}
@@ -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
@@ -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())) // <option> could be an empty string
+ if (!(m_fEmpty = strOption.empty())) // <option> could be an empty string
{
if ( ((wtType = LLWearableType::typeNameToType(strOption)) != LLWearableType::WT_INVALID) && (wtType != LLWearableType::WT_NONE) )
m_varOption = wtType; // ... or specify a (valid) clothing layer

0 comments on commit bf3dbd6

Please sign in to comment.