From 28f13b806c99a6ca52961c9d442594bdef5af4c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Fri, 10 Jan 2020 16:06:44 -0500 Subject: [PATCH] Some harmless reorganization --- indra/llui/llscrolllistctrl.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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()); }