Outliner: Simplify logic for parent nesting
authorDalai Felinto <dfelinto@gmail.com>
Fri, 19 Apr 2019 22:02:05 +0000 (19:02 -0300)
committerDalai Felinto <dfelinto@gmail.com>
Sat, 20 Apr 2019 01:27:44 +0000 (22:27 -0300)
source/blender/editors/space_outliner/outliner_tree.c

index 6b24e83..58585d3 100644 (file)
@@ -1470,10 +1470,7 @@ static void outliner_make_object_parent_hierarchy(ListBase *lb)
         BLI_remlink(lb, te);
         tep = (TreeElement *)ob->parent->id.newid;
         BLI_addtail(&tep->subtree, te);
-        // set correct parent pointers
-        for (te = tep->subtree.first; te; te = te->next) {
-          te->parent = tep;
-        }
+        te->parent = tep;
       }
     }
     te = ten;