Fixup LLScrollListCtrl::setCommentText, and incorrect behaviors with script editor and bulk perm editor pertaining to setCommentText inherited from V3.

This commit is contained in:
Shyotl
2013-01-14 03:36:04 -06:00
parent cd27184332
commit db8225a078
8 changed files with 41 additions and 72 deletions

View File

@@ -752,7 +752,12 @@ LLScrollListCtrl::LLScrollListCtrl(const std::string& name, const LLRect& rect,
addChild(mBorder);
}
LLTextBox* textBox = new LLTextBox("comment_text",mItemListRect,std::string());
textBox->setBorderVisible(false);
textBox->setFollowsAll();
textBox->setFontShadow(LLFontGL::NO_SHADOW);
textBox->setColor(LLUI::sColorsGroup->getColor("DefaultListText"));
addChild(textBox);
}
S32 LLScrollListCtrl::getSearchColumn()
@@ -1688,7 +1693,7 @@ void LLScrollListCtrl::deselectAllItems(BOOL no_commit_on_change)
void LLScrollListCtrl::setCommentText(const std::string& comment_text)
{
getChild<LLTextBox>("comment_text")->setValue(comment_text);
getChild<LLTextBox>("comment_text")->setWrappedText(comment_text);
}
LLScrollListItem* LLScrollListCtrl::addSeparator(EAddPosition pos)
@@ -2045,6 +2050,7 @@ void LLScrollListCtrl::draw()
updateColumns();
getChildView("comment_text")->setVisible(mItemList.empty());
drawItems();
@@ -3256,20 +3262,7 @@ LLView* LLScrollListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFac
}
std::string contents = node->getTextContents();
if (!contents.empty())
{
typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
boost::char_separator<char> sep("\t\n");
tokenizer tokens(contents, sep);
tokenizer::iterator token_iter = tokens.begin();
while(token_iter != tokens.end())
{
const std::string& line = *token_iter;
scroll_list->addSimpleElement(line);
++token_iter;
}
}
scroll_list->setCommentText(contents);
return scroll_list;
}