Fix rlva force-detach crash, and autoresponse message setting not being updated.
This commit is contained in:
@@ -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 @@ 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;}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user