diff options
Diffstat (limited to 'indra/newview/llpaneleditwearable.cpp')
-rwxr-xr-x | indra/newview/llpaneleditwearable.cpp | 44 |
1 files changed, 23 insertions, 21 deletions
diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index daa7df682b..ac00c5d986 100755 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -944,11 +944,11 @@ void LLPanelEditWearable::onCommitSexChange() LLViewerWearable* wearable = gAgentWearables.getViewerWearable(type, index); if (wearable) { - wearable->setVisualParamWeight(param->getID(), is_new_sex_male, FALSE); + wearable->setVisualParamWeight(param->getID(), is_new_sex_male); } - param->setWeight( is_new_sex_male, FALSE ); + param->setWeight( is_new_sex_male); - gAgentAvatarp->updateSexDependentLayerSets( FALSE ); + gAgentAvatarp->updateSexDependentLayerSets(); gAgentAvatarp->updateVisualParams(); @@ -983,7 +983,7 @@ void LLPanelEditWearable::onTexturePickerCommit(const LLUICtrl* ctrl) U32 index = gAgentWearables.getWearableIndex(getWearable()); gAgentAvatarp->setLocalTexture(entry->mTextureIndex, image, FALSE, index); LLVisualParamHint::requestHintUpdates(); - gAgentAvatarp->wearableUpdated(type, FALSE); + gAgentAvatarp->wearableUpdated(type); } } else @@ -1007,9 +1007,9 @@ void LLPanelEditWearable::onColorSwatchCommit(const LLUICtrl* ctrl) const LLColor4& new_color = LLColor4(ctrl->getValue()); if( old_color != new_color ) { - getWearable()->setClothesColor(entry->mTextureIndex, new_color, TRUE); + getWearable()->setClothesColor(entry->mTextureIndex, new_color); LLVisualParamHint::requestHintUpdates(); - gAgentAvatarp->wearableUpdated(getWearable()->getType(), FALSE); + gAgentAvatarp->wearableUpdated(getWearable()->getType()); } } else @@ -1080,10 +1080,10 @@ void LLPanelEditWearable::saveChanges(bool force_save_as) if (force_save_as) { - // the name of the wearable has changed, re-save wearable with new name - LLAppearanceMgr::instance().removeCOFItemLinks(mWearablePtr->getItemID()); + // the name of the wearable has changed, re-save wearable with new name + LLAppearanceMgr::instance().removeCOFItemLinks(mWearablePtr->getItemID(),gAgentAvatarp->mEndCustomizeCallback); gAgentWearables.saveWearableAs(mWearablePtr->getType(), index, new_name, description, FALSE); - mNameEditor->setText(mWearableItem->getName()); + mNameEditor->setText(mWearableItem->getName()); } else { @@ -1093,17 +1093,19 @@ void LLPanelEditWearable::saveChanges(bool force_save_as) if (link_item) { // Create new link - link_inventory_item( gAgent.getID(), - link_item->getLinkedUUID(), - LLAppearanceMgr::instance().getCOF(), - link_item->getName(), - description, - LLAssetType::AT_LINK, - NULL); + LL_DEBUGS("Avatar") << "link refresh, creating new link to " << link_item->getLinkedUUID() + << " removing old link at " << link_item->getUUID() + << " wearable item id " << mWearablePtr->getItemID() << LL_ENDL; + + LLInventoryObject::const_object_list_t obj_array; + obj_array.push_back(LLConstPointer<LLInventoryObject>(link_item)); + link_inventory_array(LLAppearanceMgr::instance().getCOF(), + obj_array, + gAgentAvatarp->mEndCustomizeCallback); // Remove old link - gInventory.purgeObject(link_item->getUUID()); + remove_inventory_item(link_item->getUUID(), gAgentAvatarp->mEndCustomizeCallback); } - gAgentWearables.saveWearable(mWearablePtr->getType(), index, TRUE, new_name); + gAgentWearables.saveWearable(mWearablePtr->getType(), index, new_name); } @@ -1121,7 +1123,7 @@ void LLPanelEditWearable::revertChanges() mNameEditor->setText(mWearableItem->getName()); updatePanelPickerControls(mWearablePtr->getType()); updateTypeSpecificControls(mWearablePtr->getType()); - gAgentAvatarp->wearableUpdated(mWearablePtr->getType(), FALSE); + gAgentAvatarp->wearableUpdated(mWearablePtr->getType()); } void LLPanelEditWearable::showWearable(LLViewerWearable* wearable, BOOL show, BOOL disable_camera_switch) @@ -1583,7 +1585,7 @@ void LLPanelEditWearable::onInvisibilityCommit(LLCheckBoxCtrl* checkbox_ctrl, LL LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTexture( IMG_INVISIBLE ); U32 index = gAgentWearables.getWearableIndex(getWearable()); gAgentAvatarp->setLocalTexture(te, image, FALSE, index); - gAgentAvatarp->wearableUpdated(getWearable()->getType(), FALSE); + gAgentAvatarp->wearableUpdated(getWearable()->getType()); } else { @@ -1600,7 +1602,7 @@ void LLPanelEditWearable::onInvisibilityCommit(LLCheckBoxCtrl* checkbox_ctrl, LL U32 index = gAgentWearables.getWearableIndex(getWearable()); gAgentAvatarp->setLocalTexture(te, image, FALSE, index); - gAgentAvatarp->wearableUpdated(getWearable()->getType(), FALSE); + gAgentAvatarp->wearableUpdated(getWearable()->getType()); } updatePanelPickerControls(getWearable()->getType()); |