summaryrefslogtreecommitdiff
path: root/indra/newview/llpaneloutfitedit.cpp
diff options
context:
space:
mode:
authorYuri Chebotarev <ychebotarev@productengine.com>2010-04-07 12:20:26 +0300
committerYuri Chebotarev <ychebotarev@productengine.com>2010-04-07 12:20:26 +0300
commit5b8ea41e42dc7d9ea5d9a4c7bd477a88e62b8bf8 (patch)
tree57f1e8a2c196bc600ee27d69a4d16e798d425416 /indra/newview/llpaneloutfitedit.cpp
parente8e1e87dd5c4f13a041c8d04311399a59447899d (diff)
parentd4deaf6c9b631c5d59765967f6f715d2ed6eaf28 (diff)
merge
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llpaneloutfitedit.cpp')
-rw-r--r--indra/newview/llpaneloutfitedit.cpp25
1 files changed, 19 insertions, 6 deletions
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index 1ab2100a41..b956004129 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -367,19 +367,32 @@ void LLPanelOutfitEdit::onUpClicked(void)
void LLPanelOutfitEdit::onEditWearableClicked(void)
{
LLUUID id_to_edit = mLookContents->getSelectionInterface()->getCurrentID();
-
LLViewerInventoryItem * item_to_edit = gInventory.getItem(id_to_edit);
if (item_to_edit)
{
// returns null if not a wearable (attachment, etc).
LLWearable* wearable_to_edit = gAgentWearables.getWearableFromAssetID(item_to_edit->getAssetUUID());
- if (!wearable_to_edit || !wearable_to_edit->getPermissions().allowModifyBy(gAgent.getID()) )
- {
- LLSidepanelAppearance::editWearable(wearable_to_edit, getParent());
- if (mEditWearableBtn->getVisible())
+ if(wearable_to_edit)
+ {
+ bool can_modify = false;
+ bool is_complete = item_to_edit->isComplete();
+ // if item_to_edit is a link, its properties are not appropriate,
+ // lets get original item with actual properties
+ LLViewerInventoryItem* original_item = gInventory.getItem(wearable_to_edit->getItemID());
+ if(original_item)
{
- mEditWearableBtn->setVisible(FALSE);
+ can_modify = original_item->getPermissions().allowModifyBy(gAgentID);
+ is_complete = original_item->isComplete();
+ }
+
+ if (can_modify && is_complete)
+ {
+ LLSidepanelAppearance::editWearable(wearable_to_edit, getParent());
+ if (mEditWearableBtn->getVisible())
+ {
+ mEditWearableBtn->setVisible(FALSE);
+ }
}
}
}