FIx T56758: Outliner - Select Hierarchy not working.
[blender.git] / source / blender / editors / space_outliner / outliner_select.c
index bc01681607511a109b105c2882dcc9624a28c3b7..d1d97e37b59034cfedf7d701e3980ef309f330ae 100644 (file)
@@ -211,7 +211,7 @@ static void do_outliner_object_select_recursive(ViewLayer *view_layer, Object *o
 
        for (base = FIRSTBASE(view_layer); base; base = base->next) {
                Object *ob = base->object;
-               if ((((base->flag & BASE_VISIBLE) == 0) && BKE_object_is_child_recursive(ob_parent, ob))) {
+               if ((((base->flag & BASE_VISIBLE) != 0) && BKE_object_is_child_recursive(ob_parent, ob))) {
                        ED_object_base_select(base, select ? BA_SELECT : BA_DESELECT);
                }
        }