diff options
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 62 |
1 files changed, 36 insertions, 26 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index ab3e60b2fa..42bb62ad47 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -187,6 +187,11 @@ BOOL LLInvFVBridge::isItemRemovable() { return FALSE; } + if (LLAppearanceManager::instance().getIsProtectedCOFItem(mUUID)) + { + return FALSE; + } + const LLInventoryObject *obj = model->getItem(mUUID); if (obj && obj->getIsLinkType()) { @@ -576,8 +581,8 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, disabled_items.push_back(std::string("Paste As Link")); } } - items.push_back(std::string("Paste Separator")); + items.push_back(std::string("Paste Separator")); if (obj && obj->getIsLinkType() && !get_is_item_worn(mUUID)) { @@ -714,14 +719,7 @@ BOOL LLInvFVBridge::isAgentInventory() const BOOL LLInvFVBridge::isCOFFolder() const { - const LLInventoryModel* model = getInventoryModel(); - if(!model) return TRUE; - const LLUUID cof_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); - if (mUUID == cof_id || model->isObjectDescendentOf(mUUID, cof_id)) - { - return TRUE; - } - return FALSE; + return LLAppearanceManager::instance().getIsInCOF(mUUID); } BOOL LLInvFVBridge::isItemPermissive() const @@ -3702,18 +3700,6 @@ BOOL LLCallingCardBridge::dragOrDrop(MASK mask, BOOL drop, return rv; } -BOOL LLCallingCardBridge::removeItem() -{ - if (LLFriendCardsManager::instance().isItemInAnyFriendsList(getItem())) - { - LLAvatarActions::removeFriendDialog(getItem()->getCreatorUUID()); - return FALSE; - } - else - { - return LLItemBridge::removeItem(); - } -} // +=================================================+ // | LLNotecardBridge | // +=================================================+ @@ -3825,8 +3811,25 @@ void LLGestureBridge::openItem() BOOL LLGestureBridge::removeItem() { - // Force close the preview window, if it exists - LLGestureManager::instance().deactivateGesture(mUUID); + // Grab class information locally since *this may be deleted + // within this function. Not a great pattern... + const LLInventoryModel* model = getInventoryModel(); + if(!model) + { + return FALSE; + } + const LLUUID item_id = mUUID; + + // This will also force close the preview window, if it exists. + // This may actually delete *this, if mUUID is in the COF. + LLGestureManager::instance().deactivateGesture(item_id); + + // If deactivateGesture deleted *this, then return out immediately. + if (!model->getObject(item_id)) + { + return TRUE; + } + return LLItemBridge::removeItem(); } @@ -4620,7 +4623,10 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) getClipboardEntries(true, items, disabled_items, flags); - items.push_back(std::string("Wearable Separator")); + if (!is_sidepanel) + { + items.push_back(std::string("Wearable Separator")); + } items.push_back(std::string("Wearable Edit")); @@ -5150,8 +5156,12 @@ void LLLandmarkBridgeAction::doIt() // Opening (double-clicking) a landmark immediately teleports, // but warns you the first time. LLSD payload; - payload["asset_id"] = item->getAssetUUID(); - LLNotificationsUtil::add("TeleportFromLandmark", LLSD(), payload); + payload["asset_id"] = item->getAssetUUID(); + + LLSD args; + args["LOCATION"] = item->getDisplayName(); + + LLNotificationsUtil::add("TeleportFromLandmark", args, payload); } LLInvFVBridgeAction::doIt(); |