From 11e192d9a72274d24e2a50799904c7a64ab33e27 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Tue, 20 Dec 2011 11:43:02 -0800 Subject: 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 --- indra/newview/llinventorybridge.cpp | 12 ++++++------ 1 file 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) { -- cgit v1.2.3