diff options
author | prep <prep@lindenlab.com> | 2012-01-05 17:02:53 -0500 |
---|---|---|
committer | prep <prep@lindenlab.com> | 2012-01-05 17:02:53 -0500 |
commit | a5a2b2b0202ab89f5116ef1b02f8adc67f35eab9 (patch) | |
tree | b41f63b71ac197ef49aefc9d3f09b922d2cc5795 /indra/llui | |
parent | 22b877e70a6f72256ff585465232bed93792571d (diff) | |
parent | fcdfd631238e22186b11be5275747e37eff65d1f (diff) |
merge
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llscrolllistctrl.cpp | 16 | ||||
-rw-r--r-- | indra/llui/llscrolllistctrl.h | 1 |
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 |