summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorygallerymenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llinventorygallerymenu.cpp')
-rw-r--r--indra/newview/llinventorygallerymenu.cpp32
1 files changed, 6 insertions, 26 deletions
diff --git a/indra/newview/llinventorygallerymenu.cpp b/indra/newview/llinventorygallerymenu.cpp
index e7f8b10cca..bc4b28b584 100644
--- a/indra/newview/llinventorygallerymenu.cpp
+++ b/indra/newview/llinventorygallerymenu.cpp
@@ -134,20 +134,10 @@ void LLInventoryGalleryContextMenu::doToSelected(const LLSD& userdata, const LLU
}
else if ("cut" == action)
{
- bool allow = false;
- if(is_folder)
- {
- allow = get_is_category_removable(&gInventory, selected_id);
- }
- else
- {
- allow = get_is_item_removable(&gInventory, selected_id);
- }
- if(allow)
- {
- LLClipboard::instance().setCutMode(true);
- LLClipboard::instance().addToClipboard(selected_id);
- }
+ if (mGallery->canCut())
+ {
+ mGallery->cut();
+ }
}
else if ("paste" == action)
{
@@ -227,19 +217,9 @@ void LLInventoryGalleryContextMenu::doToSelected(const LLSD& userdata, const LLU
}
else if ("copy" == action)
{
- if(is_folder)
+ if (mGallery->canCopy())
{
- LLClipboard::instance().reset();
- LLClipboard::instance().addToClipboard(selected_id);
- }
- else
- {
- LLViewerInventoryItem* inv_item = gInventory.getItem(selected_id);
- if (inv_item && inv_item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID()) && !get_is_item_worn(selected_id))
- {
- LLClipboard::instance().reset();
- LLClipboard::instance().addToClipboard(selected_id);
- }
+ mGallery->copy();
}
}
else if ("paste_link" == action)