diff options
author | Leslie Linden <leslie@lindenlab.com> | 2011-12-20 11:43:02 -0800 |
---|---|---|
committer | Leslie Linden <leslie@lindenlab.com> | 2011-12-20 11:43:02 -0800 |
commit | 11e192d9a72274d24e2a50799904c7a64ab33e27 (patch) | |
tree | fc1c517cf5f6ea0899b2cc4c948196e23c802e23 /indra | |
parent | 744484699cec728f60463755d409fbde681429ea (diff) |
EXP-1738 FIX -- Disable drag and drop to folders in the outbox that would create a hierarchy that contains too many folders
EXP-1743 FIX -- Tooltip errors given when dragging and dropping folders onto themselves in Merchant Outbox
* Top level folder now reflected in folder count for total folders
* Earlier rejections now honored in drag and drop code so outbox-specific tooltips only show up when appropriate
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 4e26f09978..2ff6563a09 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1918,9 +1918,9 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, BOOL is_movable = TRUE; if (LLFolderType::lookupIsProtectedType(inv_cat->getPreferredType())) is_movable = FALSE; - if (move_is_into_outfit) + else if (move_is_into_outfit) is_movable = FALSE; - if (mUUID == gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE)) + else if (mUUID == gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE)) is_movable = FALSE; LLInventoryModel::cat_array_t descendent_categories; LLInventoryModel::item_array_t descendent_items; @@ -1935,7 +1935,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, break; } } - if (move_is_into_trash) + if (is_movable && move_is_into_trash) { for (S32 i=0; i < descendent_items.count(); ++i) { @@ -1947,7 +1947,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, } } } - if (move_is_into_landmarks) + if (is_movable && move_is_into_landmarks) { for (S32 i=0; i < descendent_items.count(); ++i) { @@ -1962,7 +1962,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, } } } - if (move_is_into_outbox) + if (is_movable && move_is_into_outbox) { int nested_folder_levels = get_folder_path_length(outbox_id, mUUID) + get_folder_levels(inv_cat); @@ -1976,7 +1976,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, const LLViewerInventoryCategory * master_folder = model->getFirstDescendantOf(outbox_id, mUUID); int existing_item_count = 0; - int existing_folder_count = LLToolDragAndDrop::instance().getCargoIDsCount(); + int existing_folder_count = 1 + LLToolDragAndDrop::instance().getCargoIDsCount(); // +1 for master folder if (master_folder != NULL) { |