Fix annoyance of duplicated rights confirmation dialog when checking a checkbox prior selecting the row in legacy friend list

Tue, 16 Dec 2014 15:36:05 +0100

author
Ansariel
date
Tue, 16 Dec 2014 15:36:05 +0100
changeset 43082
3e36f166323e
parent 43081
86b7a2faaaef
child 43083
85cdca1c482e

Fix annoyance of duplicated rights confirmation dialog when checking a checkbox prior selecting the row in legacy friend list

indra/newview/fsfloatercontacts.cpp file | annotate | diff | revisions
indra/newview/fsfloatercontacts.h file | annotate | diff | revisions
     1.1 --- a/indra/newview/fsfloatercontacts.cpp	Tue Dec 16 14:35:18 2014 +0100
     1.2 +++ b/indra/newview/fsfloatercontacts.cpp	Tue Dec 16 15:36:05 2014 +0100
     1.3 @@ -86,7 +86,8 @@
     1.4  	mObserver(NULL),
     1.5  	mFriendsList(NULL),
     1.6  	mGroupList(NULL),
     1.7 -	mAllowRightsChange(TRUE),
     1.8 +	mAllowRightsChange(true),
     1.9 +	mRightsChangeNotificationTriggered(false),
    1.10  	mNumRightsChanged(0),
    1.11  	mRlvBehaviorCallbackConnection(),
    1.12  	mResetLastColumnDisplayModeChanged(false),
    1.13 @@ -191,6 +192,8 @@
    1.14  		mDirtyNames = false;
    1.15  	}
    1.16  
    1.17 +	mRightsChangeNotificationTriggered = false;
    1.18 +
    1.19  	LLFloater::draw();
    1.20  }
    1.21  
    1.22 @@ -553,11 +556,11 @@
    1.23  				--mNumRightsChanged;
    1.24  				if (mNumRightsChanged > 0)
    1.25  				{
    1.26 -					mAllowRightsChange = FALSE;
    1.27 +					mAllowRightsChange = false;
    1.28  				}
    1.29  				else
    1.30  				{
    1.31 -					mAllowRightsChange = TRUE;
    1.32 +					mAllowRightsChange = true;
    1.33  				}
    1.34  			
    1.35  				const std::set<LLUUID>& changed_items = at.getChangedIDs();
    1.36 @@ -905,6 +908,7 @@
    1.37  			}
    1.38  		}
    1.39  	}
    1.40 +	
    1.41  }
    1.42  
    1.43  bool FSFloaterContacts::modifyRightsConfirmation(const LLSD& notification, const LLSD& response, rights_map_t* rights)
    1.44 @@ -932,6 +936,11 @@
    1.45  
    1.46  void FSFloaterContacts::applyRightsToFriends()
    1.47  {
    1.48 +	if (mRightsChangeNotificationTriggered)
    1.49 +	{
    1.50 +		return;
    1.51 +	}
    1.52 +
    1.53  	bool rights_changed = false;
    1.54  
    1.55  	// store modify rights separately for confirmation
    1.56 @@ -1019,6 +1028,7 @@
    1.57  	if (need_confirmation)
    1.58  	{
    1.59  		confirmModifyRights(rights_updates, confirmation_type);
    1.60 +		mRightsChangeNotificationTriggered = true;
    1.61  	}
    1.62  	else
    1.63  	{
     2.1 --- a/indra/newview/fsfloatercontacts.h	Tue Dec 16 14:35:18 2014 +0100
     2.2 +++ b/indra/newview/fsfloatercontacts.h	Tue Dec 16 15:36:05 2014 +0100
     2.3 @@ -145,8 +145,9 @@
     2.4  	LLTabContainer*			mTabContainer;
     2.5  
     2.6  	LLFriendObserver*		mObserver;
     2.7 -	BOOL					mAllowRightsChange;
     2.8 +	bool					mAllowRightsChange;
     2.9  	S32						mNumRightsChanged;
    2.10 +	bool					mRightsChangeNotificationTriggered;
    2.11  
    2.12  	std::string				mFriendListFontName;
    2.13  

mercurial