diff options
author | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2014-05-23 12:17:32 +0300 |
---|---|---|
committer | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2014-05-23 12:17:32 +0300 |
commit | dc304b2be8cdf2f4496d85c7e7b3b95e5f4da716 (patch) | |
tree | 57a68b167870b02b1e717c7dd55c948dd869fcd1 /indra/newview/llinventorybridge.cpp | |
parent | 5956e75e174441eeb49d3733b6b096a276ebffd3 (diff) |
MAINT-2255 FIXED Allow copy only landmarks to Favorites.
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rwxr-xr-x | indra/newview/llinventorybridge.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
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<LLUUID> 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" |