summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelplaces.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-03-25 22:58:26 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-03-25 22:58:26 +0200
commitb2d339ff066340add19092a3f79b3f48d5ade957 (patch)
tree44d58dc436ad0721e4c8ea97d0b639d31e5fb88c /indra/newview/llpanelplaces.cpp
parentd38c2d8cd8b5588263b0bd01bfcb122282fb6af9 (diff)
SL-14855 Disable edit button for uneditable items
Diffstat (limited to 'indra/newview/llpanelplaces.cpp')
-rw-r--r--indra/newview/llpanelplaces.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp
index 53870fb5c7..5dfeb7f619 100644
--- a/indra/newview/llpanelplaces.cpp
+++ b/indra/newview/llpanelplaces.cpp
@@ -430,10 +430,15 @@ void LLPanelPlaces::onOpen(const LLSD& key)
{
mLandmarkInfo->setInfoType(LLPanelPlaceInfo::LANDMARK);
- LLInventoryItem* item = gInventory.getItem(key["id"].asUUID());
+ LLUUID id = key["id"].asUUID();
+ LLInventoryItem* item = gInventory.getItem(id);
if (!item)
return;
+ BOOL is_editable = gInventory.isObjectDescendentOf(id, gInventory.getRootFolderID())
+ && item->getPermissions().allowModifyBy(gAgent.getID());
+ mLandmarkInfo->setCanEdit(is_editable);
+
setItem(item);
}
else if (mPlaceInfoType == REMOTE_PLACE_INFO_TYPE)