From dc304b2be8cdf2f4496d85c7e7b3b95e5f4da716 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 23 May 2014 12:17:32 +0300 Subject: MAINT-2255 FIXED Allow copy only landmarks to Favorites. --- indra/newview/llinventorybridge.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 60a95741b3..feb7a0e904 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -103,6 +103,7 @@ bool move_task_inventory_callback(const LLSD& notification, const LLSD& response bool confirm_attachment_rez(const LLSD& notification, const LLSD& response); void teleport_via_landmark(const LLUUID& asset_id); static BOOL can_move_to_outfit(LLInventoryItem* inv_item, BOOL move_is_into_current_outfit); +static BOOL can_move_to_landmarks(LLInventoryItem* inv_item); static bool check_category(LLInventoryModel* model, const LLUUID& cat_id, LLInventoryPanel* active_panel, @@ -3190,10 +3191,12 @@ void LLFolderBridge::pasteFromClipboard() { const LLUUID ¤t_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, false); const LLUUID &outbox_id = model->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false); + const LLUUID &favorites_id = model->findCategoryUUIDForType(LLFolderType::FT_FAVORITE, false); const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id); const BOOL move_is_into_outfit = (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT); const BOOL move_is_into_outbox = model->isObjectDescendentOf(mUUID, outbox_id); + const BOOL move_is_into_favorites = (mUUID == favorites_id); std::vector objects; LLClipboard::instance().pasteFromClipboard(objects); @@ -3256,6 +3259,13 @@ void LLFolderBridge::pasteFromClipboard() dropToOutfit(item, move_is_into_current_outfit); } } + else if (move_is_into_favorites) + { + if (item && can_move_to_landmarks(item)) + { + dropToFavorites(item); + } + } else if (LLClipboard::instance().isCutMode()) { // Do a move to "paste" a "cut" -- cgit v1.2.3