diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index e9d40d0d4..23aa72da6 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -2722,8 +2722,6 @@ void LLScrollListCtrl::setScrollListParameters(LLXMLNodePtr node) S32 search_column = 0; node->getAttributeS32("search_column", search_column); - S32 sort_column = -1; - node->getAttributeS32("sort_column", sort_column); BOOL sort_ascending = true; node->getAttributeBOOL("sort_ascending", sort_ascending); @@ -2738,7 +2736,7 @@ void LLScrollListCtrl::setScrollListParameters(LLXMLNodePtr node) { if (child->hasName("column") || child->hasName("columns") || child->hasName(kidcolumn) || child->hasName(kidcolumns)) { - std::string labelname(""); + std::string labelname; if (child->getAttributeString("label", labelname)) columns[index]["label"] = labelname; else if (child->getAttributeString("image", labelname)) @@ -2791,11 +2789,6 @@ void LLScrollListCtrl::setScrollListParameters(LLXMLNodePtr node) } setColumnHeadings(columns); - if (sort_column >= 0) - { - sortByColumnIndex(sort_column, sort_ascending); - } - const std::string kidrow(nodename + "row"); const std::string kidrows(nodename + "rows"); for (LLXMLNodePtr child = node->getFirstChild(); child.notNull(); child = child->getNextSibling()) @@ -2850,6 +2843,13 @@ void LLScrollListCtrl::setScrollListParameters(LLXMLNodePtr node) } } + S32 sort_column = -1; + node->getAttributeS32("sort_column", sort_column); + if (sort_column >= 0) + { + sortByColumnIndex(sort_column, sort_ascending); + } + setCommentText(node->getTextContents()); }