summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorybridge.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2010-01-21 20:34:10 -0500
committerLoren Shih <seraph@lindenlab.com>2010-01-21 20:34:10 -0500
commitaf2f61af502d483011a8f6722686a2c343bd0f7d (patch)
tree6ab1b7f8545cf6685f17f722c6e9c0b173857038 /indra/newview/llinventorybridge.cpp
parent2c0418dfe0a3e903210516a70fd947870c340bf8 (diff)
EXT-4492 Deleting gestures from the wearing tab causes the viewer to crash
Removed "delete" from the COF menu, since it is normally disabled from the inventory view.
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rw-r--r--indra/newview/llinventorybridge.cpp25
1 files changed, 21 insertions, 4 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 099f863dc9..1c88658920 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -574,18 +574,35 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id,
disabled_items.push_back(std::string("Paste As Link"));
}
}
- items.push_back(std::string("Paste Separator"));
+ // Don't add a separator unless we have at least one entry beneath it,
+ // to avoid double separators.
+ BOOL separator_pasted = FALSE;
if (obj && obj->getIsLinkType() && !get_is_item_worn(mUUID))
{
+ if (!separator_pasted)
+ {
+ items.push_back(std::string("Paste Separator"));
+ separator_pasted = TRUE;
+ }
items.push_back(std::string("Remove Link"));
}
- items.push_back(std::string("Delete"));
- if (!isItemRemovable())
+ // Hide the delete button from the COF. Detaching/removing/etc. an item in the COF
+ // will naturally delete it. This prevents double delete crash possibilities.
+ if (!isCOFFolder())
{
- disabled_items.push_back(std::string("Delete"));
+ if (!separator_pasted)
+ {
+ items.push_back(std::string("Paste Separator"));
+ separator_pasted = TRUE;
+ }
+ items.push_back(std::string("Delete"));
+ if (!isItemRemovable())
+ {
+ disabled_items.push_back(std::string("Delete"));
+ }
}
// If multiple items are selected, disable properties (if it exists).