summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelobjectinventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelobjectinventory.cpp')
-rw-r--r--indra/newview/llpanelobjectinventory.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index ef7986603b..f90d6d5b3f 100644
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -129,6 +129,7 @@ public:
virtual void navigateToFolder(bool new_window = false, bool change_mode = false) {}
virtual bool isItemRenameable() const;
virtual bool renameItem(const std::string& new_name);
+ virtual bool isFavorite() const { return false; }
virtual bool isItemMovable() const;
virtual bool isItemRemovable(bool check_worn = true) const;
virtual bool removeItem();
@@ -1364,7 +1365,23 @@ bool LLPanelObjectInventory::postBuild()
void LLPanelObjectInventory::doToSelected(const LLSD& userdata)
{
- LLInventoryAction::doToSelected(&gInventory, mFolders, userdata.asString());
+ std::string action = userdata.asString();
+ if ("rename" == action || "delete" == action)
+ {
+ LLViewerObject* objectp = gObjectList.findObject(mTaskUUID);
+ if (objectp && !objectp->permModify())
+ {
+ LLNotificationsUtil::add("CantModifyContentInNoModTask");
+ }
+ else
+ {
+ LLInventoryAction::doToSelected(&gInventory, mFolders, action);
+ }
+ }
+ else
+ {
+ LLInventoryAction::doToSelected(&gInventory, mFolders, action);
+ }
}
void LLPanelObjectInventory::clearContents()