diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2021-06-25 20:05:07 +0300 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2021-06-25 20:05:07 +0300 |
commit | 74c6580e5c3507ef72590a3543e2b0b2ee9c13a3 (patch) | |
tree | 1abb5c7f1cd19e4b8b75f2f87ea4203013aa1718 /indra/newview/llnamelistctrl.cpp | |
parent | f6a5bda34b4c574cf198c6c2b4131c18d3b68fc0 (diff) |
SL-15297 WIP restore selection after updating the list & don't show avatars in the list as disabled when complexity is not limited
Diffstat (limited to 'indra/newview/llnamelistctrl.cpp')
-rw-r--r-- | indra/newview/llnamelistctrl.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp index e1bf9b1a17..92805e03f0 100644 --- a/indra/newview/llnamelistctrl.cpp +++ b/indra/newview/llnamelistctrl.cpp @@ -464,6 +464,34 @@ LLScrollListItem* LLNameListCtrl::getNameItemByAgentId(const LLUUID& agent_id) return NULL; } +void LLNameListCtrl::selectItemBySpecialId(const LLUUID& special_id) +{ + if (special_id.isNull()) + { + return; + } + + for (item_list::iterator it = getItemList().begin(); it != getItemList().end(); it++) + { + LLNameListItem* item = dynamic_cast<LLNameListItem*>(*it); + if (item && item->getSpecialID() == special_id) + { + item->setSelected(TRUE); + break; + } + } +} + +LLUUID LLNameListCtrl::getSelectedSpecialId() +{ + LLNameListItem* item = dynamic_cast<LLNameListItem*>(getFirstSelected()); + if(item) + { + return item->getSpecialID(); + } + return LLUUID(); +} + void LLNameListCtrl::onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name, std::string suffix, |