Skip to content

Commit bf3dbd6

Browse files
committed
Fix rlva force-detach crash, and autoresponse message setting not being updated.
1 parent 027c3be commit bf3dbd6

4 files changed

Lines changed: 5 additions & 40 deletions

File tree

indra/llui/lltexteditor.cpp

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4792,44 +4792,6 @@ LLXMLNodePtr LLTextEditor::getXML(bool save_children) const
47924792
return node;
47934793
}
47944794

4795-
// static
4796-
LLView* LLTextEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
4797-
{
4798-
LLRect rect;
4799-
createRect(node, rect, parent, LLRect());
4800-
4801-
U32 max_text_length = 255;
4802-
node->getAttributeU32("max_length", max_text_length);
4803-
4804-
BOOL allow_embedded_items;
4805-
node->getAttributeBOOL("embedded_items", allow_embedded_items);
4806-
4807-
LLFontGL* font = LLView::selectFont(node);
4808-
4809-
std::string text = node->getTextContents().substr(0, max_text_length - 1);
4810-
4811-
LLTextEditor* text_editor = new LLTextEditor("text_editor",
4812-
rect,
4813-
max_text_length,
4814-
text,
4815-
font,
4816-
allow_embedded_items);
4817-
4818-
text_editor->setTextEditorParameters(node);
4819-
4820-
BOOL hide_scrollbar = FALSE;
4821-
node->getAttributeBOOL("hide_scrollbar",hide_scrollbar);
4822-
text_editor->setHideScrollbarForShortDocs(hide_scrollbar);
4823-
4824-
BOOL commit_on_focus_lost = FALSE;
4825-
node->getAttributeBOOL("commit_on_focus_lost",commit_on_focus_lost);
4826-
text_editor->setCommitOnFocusLost(commit_on_focus_lost);
4827-
4828-
text_editor->initFromXML(node, parent);
4829-
4830-
return text_editor;
4831-
}
4832-
48334795
void LLTextEditor::setTextEditorParameters(LLXMLNodePtr node)
48344796
{
48354797
BOOL word_wrap = FALSE;

indra/llui/lltexteditor.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ class LLTextEditor : public LLUICtrl, LLEditMenuHandler, protected LLPreeditor
7676
void setKeystrokeCallback(const keystroke_signal_t::slot_type& callback);
7777

7878
virtual LLXMLNodePtr getXML(bool save_children = true) const;
79-
static LLView* fromXML(LLXMLNodePtr node, LLView *parent, class LLUICtrlFactory *factory);
8079
void setTextEditorParameters(LLXMLNodePtr node);
8180
void setParseHTML(BOOL parsing) {mParseHTML=parsing;}
8281
void setParseHighlights(BOOL parsing) {mParseHighlights=parsing;}

indra/newview/llviewertexteditor.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1672,6 +1672,10 @@ LLView* LLViewerTextEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlF
16721672
text_editor->setParseHTML(parse_html);
16731673
text_editor->setParseHighlights(TRUE);
16741674

1675+
BOOL commit_on_focus_lost = FALSE;
1676+
node->getAttributeBOOL("commit_on_focus_lost",commit_on_focus_lost);
1677+
text_editor->setCommitOnFocusLost(commit_on_focus_lost);
1678+
16751679
text_editor->initFromXML(node, parent);
16761680

16771681
// add text after all parameters have been set

indra/newview/rlvhelper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ RlvCommandOptionGeneric::RlvCommandOptionGeneric(const std::string& strOption):
192192
LLWearableType::EType wtType(LLWearableType::WT_INVALID); LLUUID idOption; ERlvAttachGroupType eAttachGroup(RLV_ATTACHGROUP_INVALID);
193193
LLViewerJointAttachment* pAttachPt = NULL; LLViewerInventoryCategory* pFolder = NULL;
194194

195-
if (!(m_fEmpty == strOption.empty())) // <option> could be an empty string
195+
if (!(m_fEmpty = strOption.empty())) // <option> could be an empty string
196196
{
197197
if ( ((wtType = LLWearableType::typeNameToType(strOption)) != LLWearableType::WT_INVALID) && (wtType != LLWearableType::WT_NONE) )
198198
m_varOption = wtType; // ... or specify a (valid) clothing layer

0 commit comments

Comments
 (0)