diff options
author | Nyx (Neal Orman) <nyx@lindenlab.com> | 2009-11-04 09:54:07 -0500 |
---|---|---|
committer | Nyx (Neal Orman) <nyx@lindenlab.com> | 2009-11-04 09:54:07 -0500 |
commit | 8066f4868584ebbef6512006ffc07b158f382799 (patch) | |
tree | 04b77c72f11d6b5cfea775880eb2af0f610f2408 /indra/newview/llwearable.cpp | |
parent | c10a40e54ea32825f46f91525814c19f1cb818e6 (diff) | |
parent | 826f3aa57aa0679aeb895a7145f7b406a8a1ff4e (diff) |
Automated merge with ssh://hg.lindenlab.com/viewer/viewer-2-0/
Diffstat (limited to 'indra/newview/llwearable.cpp')
-rw-r--r-- | indra/newview/llwearable.cpp | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index f2cf84c228..746214088a 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -60,7 +60,7 @@ static std::string asset_id_to_filename(const LLUUID &asset_id); LLWearable::LLWearable(const LLTransactionID& transaction_id) : mDefinitionVersion(LLWearable::sCurrentDefinitionVersion), - mType(WT_SHAPE) + mType(WT_INVALID) { mTransactionID = transaction_id; mAssetID = mTransactionID.makeAssetID(gAgent.getSecureSessionID()); @@ -68,7 +68,7 @@ LLWearable::LLWearable(const LLTransactionID& transaction_id) : LLWearable::LLWearable(const LLAssetID& asset_id) : mDefinitionVersion( LLWearable::sCurrentDefinitionVersion ), - mType(WT_SHAPE) + mType(WT_INVALID) { mAssetID = asset_id; mTransactionID.setNull(); @@ -181,13 +181,7 @@ void LLWearable::createVisualParams() { if (param->getWearableType() == mType) { - if (mVisualParamIndexMap[param->getID()]) - { - delete mVisualParamIndexMap[param->getID()]; - } - LLViewerVisualParam *new_param = param->cloneParam(this); - new_param->setIsDummy(FALSE); - mVisualParamIndexMap[param->getID()] = new_param; + addVisualParam(param->cloneParam(this)); } } @@ -750,7 +744,8 @@ void LLWearable::copyDataFrom(const LLWearable* src) mDescription = src->mDescription; mPermissions = src->mPermissions; mSaleInfo = src->mSaleInfo; - mType = src->mType; + + setType(src->mType); mSavedVisualParamMap.clear(); // Deep copy of mVisualParamMap (copies only those params that are current, filling in defaults where needed) @@ -763,9 +758,6 @@ void LLWearable::copyDataFrom(const LLWearable* src) S32 id = param->getID(); F32 weight = src->getVisualParamWeight(id); mSavedVisualParamMap[id] = weight; - - // Clones a visual param from src and adds it to this wearable. Value of param is taken from current value of source param, not saved. - addVisualParam(param->cloneParam(this)); } } @@ -860,6 +852,7 @@ void LLWearable::addVisualParam(LLVisualParam *param) { delete mVisualParamIndexMap[param->getID()]; } + param->setIsDummy(FALSE); mVisualParamIndexMap[param->getID()] = param; } |