MAINT-8034 Folder depth was not counted correctly

Fri, 01 Dec 2017 15:58:22 +0200

author
andreykproductengine <andreykproductengine@lindenlab.com>
date
Fri, 01 Dec 2017 15:58:22 +0200
changeset 53539
4b9073b7ae28
parent 53538
63897076b577
child 53540
ffd810064376

MAINT-8034 Folder depth was not counted correctly

indra/newview/llinventoryfunctions.cpp file | annotate | diff | revisions
     1.1 --- a/indra/newview/llinventoryfunctions.cpp	Sun Dec 03 14:10:39 2017 +0100
     1.2 +++ b/indra/newview/llinventoryfunctions.cpp	Fri Dec 01 15:58:22 2017 +0200
     1.3 @@ -1280,7 +1280,7 @@
     1.4      int incoming_folder_depth = get_folder_levels(inv_cat);
     1.5      // Compute the nested folders level we're inserting ourselves in
     1.6      // Note: add 1 when inserting under a listing folder as we need to take the root listing folder in the count
     1.7 -    int insertion_point_folder_depth = (root_folder ? get_folder_path_length(root_folder->getUUID(), dest_folder->getUUID()) + 1 : 0);
     1.8 +    int insertion_point_folder_depth = (root_folder ? get_folder_path_length(root_folder->getUUID(), dest_folder->getUUID()) + 1 : 1);
     1.9  
    1.10      // Get the version folder: that's where the folders and items counts start from
    1.11      const LLViewerInventoryCategory * version_folder = (insertion_point_folder_depth >= 2 ? gInventory.getFirstDescendantOf(root_folder->getUUID(), dest_folder->getUUID()) : NULL);

mercurial