Fix unable to delete links and make more purdy

This commit is contained in:
Siana Gearz
2011-11-07 05:34:12 +01:00
parent 5de4f1e2da
commit 34fb647903
3 changed files with 14 additions and 7 deletions

View File

@@ -1130,6 +1130,9 @@ void LLAgentWearables::makeNewOutfit(
if( old_wearable )
{
LLViewerInventoryItem* item = gInventory.getItem(getWearableItemID((LLWearableType::EType)index));
llassert(item);
if (!item)
continue;
if (fUseOutfits)
{
std::string strOrdering = llformat("@%d", item->getWearableType() * 100);

View File

@@ -797,7 +797,7 @@ void LLInvFVBridge::addDeleteContextMenuOptions(menuentry_vec_t &items,
}
// "Remove link" and "Delete" are the same operation.
if (obj && obj->getIsLinkType() && !get_is_item_worn(mUUID))
if (obj && obj->getIsLinkType() /* && !get_is_item_worn(mUUID)*/)
{
items.push_back(std::string("Remove Link"));
}
@@ -4289,7 +4289,7 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
if (!avatarp->canAttachMoreObjects())
{
disabled_items.push_back(std::string("Object Wea"));
disabled_items.push_back(std::string("Object Wear"));
disabled_items.push_back(std::string("Object Add"));
disabled_items.push_back(std::string("Attach To"));
disabled_items.push_back(std::string("Attach To HUD"));

View File

@@ -198,7 +198,15 @@
name="Paste As Link" width="128">
<on_click filter="" function="Inventory.DoToSelected" userdata="paste_link" />
</menu_item_call>
<menu_item_call bottom_delta="-18" height="18" label="Restore in World" left="0" mouse_opaque="true"
name="Restore to Last Position" width="128">
<on_click filter="" function="Inventory.DoToSelected" userdata="restoreToWorld" />
</menu_item_call>
<menu_item_separator name="Paste Separator" />
<menu_item_call bottom_delta="-18" height="18" label="Remove Link" left="0" mouse_opaque="true"
name="Remove Link" width="128">
<on_click filter="" function="Inventory.DoToSelected" userdata="delete" />
</menu_item_call>
<menu_item_call bottom_delta="-18" height="18" label="Delete" left="0" mouse_opaque="true"
name="Delete" width="128">
<on_click filter="" function="Inventory.DoToSelected" userdata="delete" />
@@ -267,10 +275,6 @@
<on_click filter="" function="Inventory.DoToSelected" userdata="deactivate" />
</menu_item_call>
<menu_item_separator name="Attach Separator" />
<menu_item_call bottom_delta="-18" height="18" label="Restore in World" left="0" mouse_opaque="true"
name="Restore to Last Position" width="128">
<on_click filter="" function="Inventory.DoToSelected" userdata="restoreToWorld" />
</menu_item_call>
<menu_item_call bottom_delta="-18" height="18" label="Wear" left="0" mouse_opaque="true"
name="Object Wear" width="128">
<on_click filter="" function="Inventory.DoToSelected" userdata="attach" />
@@ -302,5 +306,5 @@
</menu_item_call>
<menu_item_call bottom_delta="-18" height="18" label="--no options--" left="0"
mouse_opaque="true" name="--no options--" width="128" />
<menu_item_separator name="Wearable Separator" />
<--menu_item_separator name="Wearable Separator" /-->
</menu>