diff options
| author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2012-07-30 19:10:46 -0400 |
|---|---|---|
| committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2012-07-30 19:10:46 -0400 |
| commit | 6ae4802e6d3ed7aa67c4946c434850de3be5ffe3 (patch) | |
| tree | 2bfeb690ba2dbf9849fb318d3f551a584278cee2 /indra/llui/llscrolllistctrl.cpp | |
| parent | 020980fb4cd5f2cc18b56fa795c08c153a15bd4a (diff) | |
| parent | 58d5e223b8a15b4825b96923b5891b251c6ccc98 (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 b3e1b63db5..802914e25b 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; |
