summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llscrolllistctrl.cpp15
-rw-r--r--indra/llui/llscrolllistctrl.h1
2 files changed, 15 insertions, 1 deletions
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index 8093536868..3ed328e37f 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -423,6 +423,19 @@ std::vector<LLScrollListItem*> LLScrollListCtrl::getAllSelected() const
return ret;
}
+std::vector<LLSD> LLScrollListCtrl::getAllSelectedValues() const
+{
+ std::vector<LLSD> ret;
+ for (LLScrollListItem* item : mItemList)
+ {
+ if (item->getSelected())
+ {
+ ret.push_back(item->getValue());
+ }
+ }
+ return ret;
+}
+
S32 LLScrollListCtrl::getNumSelected() const
{
S32 numSelected = 0;
@@ -1510,7 +1523,7 @@ bool LLScrollListCtrl::setSelectedByValue(const LLSD& value, bool selected)
{
if (selected)
{
- selectItem(item, -1);
+ selectItem(item, -1, !mAllowMultipleSelection);
}
else
{
diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h
index bfae08ab5b..badaf31657 100644
--- a/indra/llui/llscrolllistctrl.h
+++ b/indra/llui/llscrolllistctrl.h
@@ -284,6 +284,7 @@ public:
LLScrollListItem* getFirstSelected() const;
virtual S32 getFirstSelectedIndex() const;
std::vector<LLScrollListItem*> getAllSelected() const;
+ std::vector<LLSD> getAllSelectedValues() const;
S32 getNumSelected() const;
LLScrollListItem* getLastSelectedItem() const { return mLastSelected; }