From bfc274741ad97a2885a26ae35108e158aeb9525e Mon Sep 17 00:00:00 2001 From: Baker Linden Date: Tue, 6 May 2014 11:01:59 -0700 Subject: [MAINT-3834] Banning more than 100 residents causes multiple floaters - Removed superfluous floater dialogs from displaying Reviewer: Simon --- indra/newview/llpanelgroupbulk.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'indra/newview/llpanelgroupbulk.cpp') diff --git a/indra/newview/llpanelgroupbulk.cpp b/indra/newview/llpanelgroupbulk.cpp index 9d02b9b45a..1eafc5bd64 100644 --- a/indra/newview/llpanelgroupbulk.cpp +++ b/indra/newview/llpanelgroupbulk.cpp @@ -66,7 +66,8 @@ LLPanelGroupBulkImpl::LLPanelGroupBulkImpl(const LLUUID& group_id) : mRoleNames(NULL), mOwnerWarning(), mAlreadyInGroup(), - mConfirmedOwnerInvite(false) + mConfirmedOwnerInvite(false), + mListFullNotificationSent(false) {} LLPanelGroupBulkImpl::~LLPanelGroupBulkImpl() @@ -201,17 +202,24 @@ void LLPanelGroupBulkImpl::addUsers(const std::vector& names, const { std::string name; LLUUID id; - - if(names.size() + mInviteeIDs.size() > MAX_GROUP_INVITES) + if(mListFullNotificationSent) + { + return; + } + + if( !mListFullNotificationSent && + (names.size() + mInviteeIDs.size() > MAX_GROUP_INVITES)) { + mListFullNotificationSent = true; + // Fail! Show a warning and don't add any names. LLSD msg; msg["MESSAGE"] = mTooManySelected; LLNotificationsUtil::add("GenericAlert", msg); return; } - + for (S32 i = 0; i < (S32)names.size(); ++i) { name = names[i]; @@ -407,6 +415,7 @@ void LLPanelGroupBulk::addUsers(uuid_vec_t& agent_ids) } } } + mImplementation->mListFullNotificationSent = false; mImplementation->addUsers(names, agent_ids); } -- cgit v1.2.3