From 27e69cab1e7e9500379f78535e6c27dafa8f0d76 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Sat, 21 Mar 2015 00:36:47 -0400 Subject: [PATCH] Support upstream's xui pattern of scroll_list.columns and such. --- indra/llui/llscrolllistctrl.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index a682c3d4c..014bb6956 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -2604,9 +2604,11 @@ LLView* LLScrollListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFac LLSD columns; S32 index = 0; + const std::string nodename(std::string(node->getName()->mString) + '.'); + const std::string kidcolumn(nodename + "columns"); for (LLXMLNodePtr child = node->getFirstChild(); child.notNull(); child = child->getNextSibling()) { - if (child->hasName("column")) + if (child->hasName("column") || child->hasName(kidcolumn)) { std::string labelname(""); if (child->getAttributeString("label", labelname)) @@ -2666,9 +2668,11 @@ LLView* LLScrollListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFac scroll_list->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()) { - if (child->hasName("row") || child->hasName("rows")) + if (child->hasName("row") || child->hasName(kidrow) || child->hasName("rows") || child->hasName(kidrows)) { LLUUID id; LLSD row;