From dfad0f4e67821670cfc806dd2f8fcdf9a0d96530 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk <vsavchuk@productengine.com> Date: Tue, 26 Jan 2010 20:17:45 +0200 Subject: Fixed critical bug EXT-4663 ([BSI] Inviting Residents to groups produces error 100% of time). Overriden LLScrollListItem::getUUID() in LLNameListCtrl so that you can get correct ID of a name list item. --HG-- branch : product-engine --- indra/newview/llnamelistctrl.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'indra/newview/llnamelistctrl.h') diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h index 192a3a5afa..23b1cb6897 100644 --- a/indra/newview/llnamelistctrl.h +++ b/indra/newview/llnamelistctrl.h @@ -122,7 +122,6 @@ public: /*virtual*/ void updateColumns(); private: void showInspector(const LLUUID& avatar_id, bool is_group); - static LLUUID getItemId(LLScrollListItem* item); private: S32 mNameColumnIndex; @@ -130,4 +129,24 @@ private: BOOL mAllowCallingCardDrop; }; +/** + * LLNameListCtrl item + * + * We don't use LLScrollListItem to be able to override getUUID(), which is needed + * because the name list item value is not simply an UUID but a map (uuid, is_group). + */ +class LLNameListItem : public LLScrollListItem +{ +public: + LLUUID getUUID() const { return getValue()["uuid"].asUUID(); } + +protected: + friend class LLNameListCtrl; + + LLNameListItem( const LLScrollListItem::Params& p ) + : LLScrollListItem(p) + { + } +}; + #endif -- cgit v1.2.3