MAINT-1429 Incorrect display of permissions in Edit Tab while change focus

Wed, 24 Feb 2016 16:39:48 +0200

author
Mnikolenko ProductEngine <mnikolenko@productengine.com>
date
Wed, 24 Feb 2016 16:39:48 +0200
changeset 48894
c4ff0fa4d023
parent 48893
6b6f4f117764
child 48895
d30b4fc0df9d

MAINT-1429 Incorrect display of permissions in Edit Tab while change focus

indra/newview/llpanelpermissions.cpp file | annotate | diff | revisions
     1.1 --- a/indra/newview/llpanelpermissions.cpp	Tue Feb 23 18:30:29 2016 +0200
     1.2 +++ b/indra/newview/llpanelpermissions.cpp	Wed Feb 24 16:39:48 2016 +0200
     1.3 @@ -571,69 +571,60 @@
     1.4  	U32 next_owner_mask_on 		= 0;
     1.5  	U32 next_owner_mask_off		= 0;
     1.6  
     1.7 -	BOOL valid_base_perms = FALSE;
     1.8 -	BOOL valid_group_perms= FALSE;
     1.9 -	BOOL valid_everyone_perms= FALSE;
    1.10 -	BOOL valid_next_perms= FALSE;
    1.11 -
    1.12 -	if(root_selected)
    1.13 -	{
    1.14 -	    valid_base_perms 		= LLSelectMgr::getInstance()->selectGetPerm(PERM_BASE,
    1.15 +	BOOL valid_base_perms 		= LLSelectMgr::getInstance()->selectGetPerm(PERM_BASE,
    1.16  																			&base_mask_on,
    1.17  																			&base_mask_off);
    1.18 -	    //BOOL valid_owner_perms =//
    1.19 -	    LLSelectMgr::getInstance()->selectGetPerm(PERM_OWNER,
    1.20 +	//BOOL valid_owner_perms =//
    1.21 +	LLSelectMgr::getInstance()->selectGetPerm(PERM_OWNER,
    1.22  											  &owner_mask_on,
    1.23  											  &owner_mask_off);
    1.24 -	    valid_group_perms 		= LLSelectMgr::getInstance()->selectGetPerm(PERM_GROUP,
    1.25 +	BOOL valid_group_perms 		= LLSelectMgr::getInstance()->selectGetPerm(PERM_GROUP,
    1.26  																			&group_mask_on,
    1.27  																			&group_mask_off);
    1.28  	
    1.29 -	    valid_everyone_perms 	= LLSelectMgr::getInstance()->selectGetPerm(PERM_EVERYONE,
    1.30 +	BOOL valid_everyone_perms 	= LLSelectMgr::getInstance()->selectGetPerm(PERM_EVERYONE,
    1.31  																			&everyone_mask_on,
    1.32  																			&everyone_mask_off);
    1.33  	
    1.34 -	    valid_next_perms 		= LLSelectMgr::getInstance()->selectGetPerm(PERM_NEXT_OWNER,
    1.35 +	BOOL valid_next_perms 		= LLSelectMgr::getInstance()->selectGetPerm(PERM_NEXT_OWNER,
    1.36  																			&next_owner_mask_on,
    1.37  																			&next_owner_mask_off);
    1.38 -	}
    1.39 -	else
    1.40 -	{
    1.41 -	    if(object_count == 1)
    1.42 -	    {
    1.43 -	        LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstNode();
    1.44 -	        if (node && node->mValid)
    1.45 -	        {
    1.46 -	            valid_base_perms = TRUE;
    1.47  
    1.48 -	            base_mask_on = node->mPermissions->getMaskBase();
    1.49 -	            owner_mask_on = node->mPermissions->getMaskOwner();
    1.50 -	            group_mask_on = node->mPermissions->getMaskGroup();
    1.51 -	            everyone_mask_on = node->mPermissions->getMaskEveryone();
    1.52 -	            next_owner_mask_on = node->mPermissions->getMaskNextOwner();
    1.53 -	        }
    1.54 -	    }
    1.55 -	}
    1.56  
    1.57 -	
    1.58  	if (gSavedSettings.getBOOL("DebugPermissions") )
    1.59  	{
    1.60  		if (valid_base_perms)
    1.61  		{
    1.62  			getChild<LLUICtrl>("B:")->setValue("B: " + mask_to_string(base_mask_on));
    1.63 -			getChildView("B:")->setVisible(							TRUE);
    1.64 -			
    1.65 +			getChildView("B:")->setVisible(TRUE);
    1.66  			getChild<LLUICtrl>("O:")->setValue("O: " + mask_to_string(owner_mask_on));
    1.67 -			getChildView("O:")->setVisible(							TRUE);
    1.68 -			
    1.69 +			getChildView("O:")->setVisible(TRUE);
    1.70  			getChild<LLUICtrl>("G:")->setValue("G: " + mask_to_string(group_mask_on));
    1.71 -			getChildView("G:")->setVisible(							TRUE);
    1.72 -			
    1.73 +			getChildView("G:")->setVisible(TRUE);
    1.74  			getChild<LLUICtrl>("E:")->setValue("E: " + mask_to_string(everyone_mask_on));
    1.75 -			getChildView("E:")->setVisible(							TRUE);
    1.76 -			
    1.77 +			getChildView("E:")->setVisible(TRUE);
    1.78  			getChild<LLUICtrl>("N:")->setValue("N: " + mask_to_string(next_owner_mask_on));
    1.79 -			getChildView("N:")->setVisible(							TRUE);
    1.80 +			getChildView("N:")->setVisible(TRUE);
    1.81 +		}
    1.82 +		else if(!root_selected)
    1.83 +		{
    1.84 +			if(object_count == 1)
    1.85 +			{
    1.86 +				LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstNode();
    1.87 +				if (node && node->mValid)
    1.88 +				{
    1.89 +					getChild<LLUICtrl>("B:")->setValue("B: " + mask_to_string( node->mPermissions->getMaskBase()));
    1.90 +					getChildView("B:")->setVisible(TRUE);
    1.91 +					getChild<LLUICtrl>("O:")->setValue("O: " + mask_to_string(node->mPermissions->getMaskOwner()));
    1.92 +					getChildView("O:")->setVisible(TRUE);
    1.93 +					getChild<LLUICtrl>("G:")->setValue("G: " + mask_to_string(node->mPermissions->getMaskGroup()));
    1.94 +					getChildView("G:")->setVisible(TRUE);
    1.95 +					getChild<LLUICtrl>("E:")->setValue("E: " + mask_to_string(node->mPermissions->getMaskEveryone()));
    1.96 +					getChildView("E:")->setVisible(TRUE);
    1.97 +					getChild<LLUICtrl>("N:")->setValue("N: " + mask_to_string(node->mPermissions->getMaskNextOwner()));
    1.98 +					getChildView("N:")->setVisible(TRUE);
    1.99 +				}
   1.100 +			}
   1.101  		}
   1.102  		else
   1.103  		{

mercurial