Remember and apply the correct camera position for the last subpart in appearance editor since we don't switch to the first subpart automatically
parent
81f242a230
commit
29c6277460
|
|
@ -1334,6 +1334,14 @@ void LLPanelEditWearable::showWearable(LLViewerWearable* wearable, BOOL show, BO
|
|||
|
||||
void LLPanelEditWearable::showDefaultSubpart()
|
||||
{
|
||||
// <FS:Ansariel> Correct camera position for last subpart
|
||||
std::map<LLWearableType::EType, U8>::iterator found = mLastShownSubpartIndex.find(mWearablePtr->getType());
|
||||
if (found != mLastShownSubpartIndex.end())
|
||||
{
|
||||
changeCamera(found->second);
|
||||
}
|
||||
else
|
||||
// </FS:Ansariel>
|
||||
changeCamera(0);
|
||||
}
|
||||
|
||||
|
|
@ -1349,6 +1357,7 @@ void LLPanelEditWearable::onTabExpandedCollapsed(const LLSD& param, U8 index)
|
|||
|
||||
if (expanded)
|
||||
{
|
||||
mLastShownSubpartIndex[mWearablePtr->getType()] = index; // <FS:Ansariel> Correct camera position for last subpart
|
||||
changeCamera(index);
|
||||
}
|
||||
|
||||
|
|
@ -1383,6 +1392,7 @@ void LLPanelEditWearable::onTabChanged(LLUICtrl* ctrl, LLWearableType::EType typ
|
|||
|
||||
if (subpart_entry && container->getCurrentPanel()->hasChild(subpart_entry->mAccordionTab, TRUE))
|
||||
{
|
||||
mLastShownSubpartIndex[type] = index; // <FS:Ansariel> Correct camera position for last subpart
|
||||
changeCamera(index);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -183,6 +183,8 @@ private:
|
|||
|
||||
typedef std::map<LLAvatarAppearanceDefines::ETextureIndex, LLUUID> s32_uuid_map_t;
|
||||
s32_uuid_map_t mPreviousAlphaTexture;
|
||||
|
||||
std::map<LLWearableType::EType, U8> mLastShownSubpartIndex;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue