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/llscrolllistctrl.cpp | |
| parent | 22b877e70a6f72256ff585465232bed93792571d (diff) | |
| parent | fcdfd631238e22186b11be5275747e37eff65d1f (diff) | |
merge
Diffstat (limited to 'indra/llui/llscrolllistctrl.cpp')
| -rw-r--r-- | indra/llui/llscrolllistctrl.cpp | 16 |
1 files changed, 16 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; |
