summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorTodd Stinson <stinson@lindenlab.com>2012-01-04 15:52:20 -0800
committerTodd Stinson <stinson@lindenlab.com>2012-01-04 15:52:20 -0800
commit10614ebd917f4dbb8a16e8a0473409c42f8d7608 (patch)
treedf96de9e1feef6ac7b464e048ca280c77f5c88c6 /indra/llui
parent3fd7752f1289f67db93e76833cc9804d057bc3c8 (diff)
Hijaking the land status messaging for temporary development of the pathfinding linksets floater.
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llscrolllistctrl.cpp16
-rw-r--r--indra/llui/llscrolllistctrl.h1
2 files changed, 17 insertions, 0 deletions
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index 466fac33ea..f7017064d7 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -389,6 +389,22 @@ std::vector<LLScrollListItem*> LLScrollListCtrl::getAllSelected() const
return ret;
}
+S32 LLScrollListCtrl::getNumSelected() const
+{
+ S32 numSelected = 0;
+
+ for(item_list::const_iterator iter = mItemList.begin(); iter != mItemList.end(); ++iter)
+ {
+ LLScrollListItem* item = *iter;
+ if (item->getSelected())
+ {
+ ++numSelected;
+ }
+ }
+
+ return numSelected;
+}
+
S32 LLScrollListCtrl::getFirstSelectedIndex() const
{
S32 CurSelectedIndex = 0;
diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h
index ae8aea9245..44d9635838 100644
--- a/indra/llui/llscrolllistctrl.h
+++ b/indra/llui/llscrolllistctrl.h
@@ -257,6 +257,7 @@ public:
LLScrollListItem* getFirstSelected() const;
virtual S32 getFirstSelectedIndex() const;
std::vector<LLScrollListItem*> getAllSelected() const;
+ S32 getNumSelected() const;
LLScrollListItem* getLastSelectedItem() const { return mLastSelected; }
// iterate over all items