From 04c2b0d06adf86ddb09953a1241a0b6acc2ebad3 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sun, 6 Sep 2009 23:27:13 -0700 Subject: Added LLScrollListCtrl::getSelectedIDs() --- linden/indra/llui/llscrolllistctrl.cpp | 12 ++++++++++++ linden/indra/llui/llscrolllistctrl.h | 1 + 2 files changed, 13 insertions(+) (limited to 'linden/indra/llui') diff --git a/linden/indra/llui/llscrolllistctrl.cpp b/linden/indra/llui/llscrolllistctrl.cpp index 7dba55f..c6da2d7 100644 --- a/linden/indra/llui/llscrolllistctrl.cpp +++ b/linden/indra/llui/llscrolllistctrl.cpp @@ -703,6 +703,18 @@ std::vector LLScrollListCtrl::getAllSelected() const return ret; } +LLDynamicArray LLScrollListCtrl::getSelectedIDs() +{ + LLUUID selected_id; + LLDynamicArray ids; + std::vector selected = this->getAllSelected(); + for(std::vector::iterator itr = selected.begin(); itr != selected.end(); ++itr) + { + ids.push_back((*itr)->getUUID()); + } + return ids; +} + S32 LLScrollListCtrl::getFirstSelectedIndex() const { S32 CurSelectedIndex = 0; diff --git a/linden/indra/llui/llscrolllistctrl.h b/linden/indra/llui/llscrolllistctrl.h index f276562..73f9a5b 100644 --- a/linden/indra/llui/llscrolllistctrl.h +++ b/linden/indra/llui/llscrolllistctrl.h @@ -517,6 +517,7 @@ public: LLScrollListItem* getFirstSelected() const; virtual S32 getFirstSelectedIndex() const; std::vector getAllSelected() const; + LLDynamicArray getSelectedIDs(); LLScrollListItem* getLastSelectedItem() const { return mLastSelected; } // iterate over all items -- cgit v1.1