summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorKelly Washington <kelly@lindenlab.com>2012-11-12 15:38:58 -0800
committerKelly Washington <kelly@lindenlab.com>2012-11-12 15:38:58 -0800
commitc5f6ff43da6a7cf5a20c61c16ba0c7aaaeb5687f (patch)
tree5d1232de9cd08e494d3b1dafe01fb2a6da74aea0 /indra/newview
parent6a947c80c316230093d45c40926ba202ba1a5cc1 (diff)
MAINT-1897 Poor performance viewing large group member lists
* Improve draw performance of scroll lists by only drawing what is visible * Reduce frequency of expensive column width calculations Fixes by Richard
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llnamelistctrl.cpp8
-rw-r--r--indra/newview/llnamelistctrl.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp
index 29e7f00a87..b0fbad33b0 100644
--- a/indra/newview/llnamelistctrl.cpp
+++ b/indra/newview/llnamelistctrl.cpp
@@ -68,7 +68,7 @@ LLNameListCtrl::LLNameListCtrl(const LLNameListCtrl::Params& p)
{}
// public
-void LLNameListCtrl::addNameItem(const LLUUID& agent_id, EAddPosition pos,
+LLScrollListItem* LLNameListCtrl::addNameItem(const LLUUID& agent_id, EAddPosition pos,
BOOL enabled, const std::string& suffix)
{
//llinfos << "LLNameListCtrl::addNameItem " << agent_id << llendl;
@@ -78,7 +78,7 @@ void LLNameListCtrl::addNameItem(const LLUUID& agent_id, EAddPosition pos,
item.enabled = enabled;
item.target = INDIVIDUAL;
- addNameItemRow(item, pos, suffix);
+ return addNameItemRow(item, pos, suffix);
}
// virtual, public
@@ -271,10 +271,10 @@ void LLNameListCtrl::addGroupNameItem(LLNameListCtrl::NameItem& item, EAddPositi
addNameItemRow(item, pos);
}
-void LLNameListCtrl::addNameItem(LLNameListCtrl::NameItem& item, EAddPosition pos)
+LLScrollListItem* LLNameListCtrl::addNameItem(LLNameListCtrl::NameItem& item, EAddPosition pos)
{
item.target = INDIVIDUAL;
- addNameItemRow(item, pos);
+ return addNameItemRow(item, pos);
}
LLScrollListItem* LLNameListCtrl::addElement(const LLSD& element, EAddPosition pos, void* userdata)
diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h
index ec29bd0ad4..3ac0565761 100644
--- a/indra/newview/llnamelistctrl.h
+++ b/indra/newview/llnamelistctrl.h
@@ -115,9 +115,9 @@ protected:
public:
// Add a user to the list by name. It will be added, the name
// requested from the cache, and updated as necessary.
- void addNameItem(const LLUUID& agent_id, EAddPosition pos = ADD_BOTTOM,
+ LLScrollListItem* addNameItem(const LLUUID& agent_id, EAddPosition pos = ADD_BOTTOM,
BOOL enabled = TRUE, const std::string& suffix = LLStringUtil::null);
- void addNameItem(NameItem& item, EAddPosition pos = ADD_BOTTOM);
+ LLScrollListItem* addNameItem(NameItem& item, EAddPosition pos = ADD_BOTTOM);
/*virtual*/ LLScrollListItem* addElement(const LLSD& element, EAddPosition pos = ADD_BOTTOM, void* userdata = NULL);
LLScrollListItem* addNameItemRow(const NameItem& value, EAddPosition pos = ADD_BOTTOM, const std::string& suffix = LLStringUtil::null);