Remember and apply the correct camera position for the last subpart in appearance editor since we don't switch to the first subpart automatically

Wed, 06 Dec 2017 16:40:58 +0100

author
Ansariel
date
Wed, 06 Dec 2017 16:40:58 +0100
changeset 53549
f1882a9c40a6
parent 53548
8fa22a2b9b78
child 53550
a3c8abf0690b

Remember and apply the correct camera position for the last subpart in appearance editor since we don't switch to the first subpart automatically

indra/newview/llpaneleditwearable.cpp file | annotate | diff | revisions
indra/newview/llpaneleditwearable.h file | annotate | diff | revisions
     1.1 --- a/indra/newview/llpaneleditwearable.cpp	Wed Dec 06 15:45:35 2017 +0100
     1.2 +++ b/indra/newview/llpaneleditwearable.cpp	Wed Dec 06 16:40:58 2017 +0100
     1.3 @@ -1334,6 +1334,14 @@
     1.4  
     1.5  void LLPanelEditWearable::showDefaultSubpart()
     1.6  {
     1.7 +        // <FS:Ansariel> Correct camera position for last subpart
     1.8 +        std::map<LLWearableType::EType, U8>::iterator found = mLastShownSubpartIndex.find(mWearablePtr->getType());
     1.9 +        if (found != mLastShownSubpartIndex.end())
    1.10 +        {
    1.11 +            changeCamera(found->second);
    1.12 +        }
    1.13 +        else
    1.14 +        // </FS:Ansariel>
    1.15          changeCamera(0);
    1.16  }
    1.17  
    1.18 @@ -1349,6 +1357,7 @@
    1.19  
    1.20          if (expanded)
    1.21          {
    1.22 +                mLastShownSubpartIndex[mWearablePtr->getType()] = index; // <FS:Ansariel> Correct camera position for last subpart
    1.23                  changeCamera(index);
    1.24          }
    1.25  
    1.26 @@ -1383,6 +1392,7 @@
    1.27  
    1.28  		if (subpart_entry && container->getCurrentPanel()->hasChild(subpart_entry->mAccordionTab, TRUE))
    1.29  		{
    1.30 +			mLastShownSubpartIndex[type] = index; // <FS:Ansariel> Correct camera position for last subpart
    1.31  			changeCamera(index);
    1.32  			break;
    1.33  		}
     2.1 --- a/indra/newview/llpaneleditwearable.h	Wed Dec 06 15:45:35 2017 +0100
     2.2 +++ b/indra/newview/llpaneleditwearable.h	Wed Dec 06 16:40:58 2017 +0100
     2.3 @@ -183,6 +183,8 @@
     2.4  
     2.5  	typedef std::map<LLAvatarAppearanceDefines::ETextureIndex, LLUUID> s32_uuid_map_t;
     2.6  	s32_uuid_map_t mPreviousAlphaTexture;
     2.7 +
     2.8 +	std::map<LLWearableType::EType, U8> mLastShownSubpartIndex;
     2.9  };
    2.10  
    2.11  #endif

mercurial