Don't setText to gibberish when building a search_editor or filter_editor fromXML
This commit is contained in:
@@ -58,7 +58,7 @@ LLView* LLFilterEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFacto
|
|||||||
S32 max_text_length = 128;
|
S32 max_text_length = 128;
|
||||||
node->getAttributeS32("max_length", max_text_length);
|
node->getAttributeS32("max_length", max_text_length);
|
||||||
|
|
||||||
std::string text = node->getValue().substr(0, max_text_length - 1);
|
//std::string text = node->getValue().substr(0, max_text_length - 1);
|
||||||
|
|
||||||
LLFilterEditor* search_editor = new LLFilterEditor("filter_editor",
|
LLFilterEditor* search_editor = new LLFilterEditor("filter_editor",
|
||||||
rect,
|
rect,
|
||||||
@@ -70,7 +70,7 @@ LLView* LLFilterEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFacto
|
|||||||
search_editor->setLabel(label);
|
search_editor->setLabel(label);
|
||||||
}
|
}
|
||||||
|
|
||||||
search_editor->setText(text);
|
//search_editor->setText(text);
|
||||||
|
|
||||||
search_editor->initFromXML(node, parent);
|
search_editor->initFromXML(node, parent);
|
||||||
|
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ LLView* LLSearchEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFacto
|
|||||||
S32 max_text_length = 128;
|
S32 max_text_length = 128;
|
||||||
node->getAttributeS32("max_length", max_text_length);
|
node->getAttributeS32("max_length", max_text_length);
|
||||||
|
|
||||||
std::string text = node->getValue().substr(0, max_text_length - 1);
|
//std::string text = node->getValue().substr(0, max_text_length - 1);
|
||||||
|
|
||||||
LLSearchEditor* search_editor = new LLSearchEditor("search_editor",
|
LLSearchEditor* search_editor = new LLSearchEditor("search_editor",
|
||||||
rect,
|
rect,
|
||||||
@@ -165,7 +165,7 @@ LLView* LLSearchEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFacto
|
|||||||
search_editor->setLabel(label);
|
search_editor->setLabel(label);
|
||||||
}
|
}
|
||||||
|
|
||||||
search_editor->setText(text);
|
//search_editor->setText(text);
|
||||||
|
|
||||||
search_editor->initFromXML(node, parent);
|
search_editor->initFromXML(node, parent);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user