Fix T61287: Object restrict viewport ignored in instanced collection
[blender.git] / source / blender / editors / space_outliner / outliner_draw.c
index 40722eb7d455b8398886a83210481db9c33063bb..84385afdb9f03fd2591606bb4f6f3d74cb65e5d6 100644 (file)
@@ -288,7 +288,7 @@ static void hidebutton_base_flag_cb(bContext *C, void *poin, void *poin2)
        }
 
        if (changed_restrict_view) {
-               BKE_main_collection_sync(bmain);
+               BKE_main_collection_sync_remap(bmain);
                DEG_id_tag_update(&ob->id, LIB_TAG_COPIED_ON_WRITE);
                DEG_relations_tag_update(bmain);
                WM_main_add_notifier(NC_OBJECT | ND_DRAW, &ob->id);