diff options
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 6382569fd5..b98329fd20 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -864,11 +864,13 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, { items.push_back(std::string("Remove from Favorites")); } - else if (is_agent_inventory - && gInventory.getRootFolderID() != mUUID - && !gInventory.isObjectDescendentOf(mUUID, gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH))) + else if (is_agent_inventory && !gInventory.isObjectDescendentOf(mUUID, gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH))) { items.push_back(std::string("Add to Favorites")); + if (gInventory.getRootFolderID() == mUUID) + { + disabled_items.push_back(std::string("Add to Favorites")); + } } if (obj->getIsLinkType()) @@ -2310,11 +2312,11 @@ bool LLItemBridge::isFavorite() const LLInventoryModel* model = getInventoryModel(); if(model) { - item = (LLViewerInventoryItem*)model->getItem(mUUID); + item = model->getItem(mUUID); } if (item) { - return item->getIsFavorite(); + return get_is_favorite(item); } return false; } |