summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterpathfindingobjects.cpp
diff options
context:
space:
mode:
authorTodd Stinson <stinson@lindenlab.com>2012-06-29 17:36:40 -0700
committerTodd Stinson <stinson@lindenlab.com>2012-06-29 17:36:40 -0700
commit9366a7775c811b8f2e0ac24872d7d744ff2b54c5 (patch)
tree8074e9b3b65cc21b4753f1da7cf5d828c2195057 /indra/newview/llfloaterpathfindingobjects.cpp
parent1bf7c4b645fb2eb307b2fb9541175569c4d8bcea (diff)
PATH-797: BUGFIX Altering how the rows are being added to the scrolllist widget to avoid a regression that occurred after merging from viewer-release recently caused the time to load a large number of elements to increase substainally.
Diffstat (limited to 'indra/newview/llfloaterpathfindingobjects.cpp')
-rw-r--r--indra/newview/llfloaterpathfindingobjects.cpp36
1 files changed, 33 insertions, 3 deletions
diff --git a/indra/newview/llfloaterpathfindingobjects.cpp b/indra/newview/llfloaterpathfindingobjects.cpp
index 847997836b..e246265be9 100644
--- a/indra/newview/llfloaterpathfindingobjects.cpp
+++ b/indra/newview/llfloaterpathfindingobjects.cpp
@@ -41,10 +41,12 @@
#include "llcheckboxctrl.h"
#include "llenvmanager.h"
#include "llfloater.h"
+#include "llfontgl.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llpathfindingmanager.h"
#include "llresmgr.h"
+#include "llscrolllistcell.h"
#include "llscrolllistctrl.h"
#include "llscrolllistitem.h"
#include "llselectmgr.h"
@@ -346,10 +348,38 @@ void LLFloaterPathfindingObjects::rebuildObjectsScrollList()
{
LLSD scrollListData = convertObjectsIntoScrollListData(mObjectList);
llassert(scrollListData.isArray());
- for (LLSD::array_const_iterator elementIter = scrollListData.beginArray(); elementIter != scrollListData.endArray(); ++elementIter)
+
+ LLScrollListCell::Params cellParams;
+ cellParams.font = LLFontGL::getFontSansSerif();
+
+ for (LLSD::array_const_iterator rowElementIter = scrollListData.beginArray(); rowElementIter != scrollListData.endArray(); ++rowElementIter)
{
- const LLSD &element = *elementIter;
- mObjectsScrollList->addElement(element);
+ const LLSD &rowElement = *rowElementIter;
+
+ LLScrollListItem::Params rowParams;
+ llassert(rowElement.has("id"));
+ llassert(rowElement.get("id").isString());
+ rowParams.value = rowElement.get("id");
+
+ llassert(rowElement.has("column"));
+ llassert(rowElement.get("column").isArray());
+ const LLSD &columnElement = rowElement.get("column");
+ for (LLSD::array_const_iterator cellIter = columnElement.beginArray(); cellIter != columnElement.endArray(); ++cellIter)
+ {
+ const LLSD &cellElement = *cellIter;
+
+ llassert(cellElement.has("column"));
+ llassert(cellElement.get("column").isString());
+ cellParams.column = cellElement.get("column").asString();
+
+ llassert(cellElement.has("value"));
+ llassert(cellElement.get("value").isString());
+ cellParams.value = cellElement.get("value").asString();
+
+ rowParams.columns.add(cellParams);
+ }
+
+ mObjectsScrollList->addRow(rowParams);
}
}