From 6c2d0240bc09866a7dde74b9a1e1cfe0d2e9bab7 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 16 Dec 2014 15:36:05 +0100 Subject: [PATCH] Fix annoyance of duplicated rights confirmation dialog when checking a checkbox prior selecting the row in legacy friend list --- indra/newview/fsfloatercontacts.cpp | 16 +++++++++++++--- indra/newview/fsfloatercontacts.h | 3 ++- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/indra/newview/fsfloatercontacts.cpp b/indra/newview/fsfloatercontacts.cpp index 2e5a17ccd7..bb6b6210aa 100644 --- a/indra/newview/fsfloatercontacts.cpp +++ b/indra/newview/fsfloatercontacts.cpp @@ -86,7 +86,8 @@ FSFloaterContacts::FSFloaterContacts(const LLSD& seed) mObserver(NULL), mFriendsList(NULL), mGroupList(NULL), - mAllowRightsChange(TRUE), + mAllowRightsChange(true), + mRightsChangeNotificationTriggered(false), mNumRightsChanged(0), mRlvBehaviorCallbackConnection(), mResetLastColumnDisplayModeChanged(false), @@ -191,6 +192,8 @@ void FSFloaterContacts::draw() mDirtyNames = false; } + mRightsChangeNotificationTriggered = false; + LLFloater::draw(); } @@ -553,11 +556,11 @@ void FSFloaterContacts::onFriendListUpdate(U32 changed_mask) --mNumRightsChanged; if (mNumRightsChanged > 0) { - mAllowRightsChange = FALSE; + mAllowRightsChange = false; } else { - mAllowRightsChange = TRUE; + mAllowRightsChange = true; } const std::set& changed_items = at.getChangedIDs(); @@ -905,6 +908,7 @@ void FSFloaterContacts::confirmModifyRights(rights_map_t& ids, EGrantRevoke comm } } } + } bool FSFloaterContacts::modifyRightsConfirmation(const LLSD& notification, const LLSD& response, rights_map_t* rights) @@ -932,6 +936,11 @@ bool FSFloaterContacts::modifyRightsConfirmation(const LLSD& notification, const void FSFloaterContacts::applyRightsToFriends() { + if (mRightsChangeNotificationTriggered) + { + return; + } + bool rights_changed = false; // store modify rights separately for confirmation @@ -1019,6 +1028,7 @@ void FSFloaterContacts::applyRightsToFriends() if (need_confirmation) { confirmModifyRights(rights_updates, confirmation_type); + mRightsChangeNotificationTriggered = true; } else { diff --git a/indra/newview/fsfloatercontacts.h b/indra/newview/fsfloatercontacts.h index a923367a79..6364329470 100644 --- a/indra/newview/fsfloatercontacts.h +++ b/indra/newview/fsfloatercontacts.h @@ -145,8 +145,9 @@ private: LLTabContainer* mTabContainer; LLFriendObserver* mObserver; - BOOL mAllowRightsChange; + bool mAllowRightsChange; S32 mNumRightsChanged; + bool mRightsChangeNotificationTriggered; std::string mFriendListFontName;