ID-Remap - Step one: core work (cleanup and rework of generic ID datablock handling).
[blender.git] / source / blender / windowmanager / intern / wm_event_system.c
index f632dd9aff49a318fa2fe25fe67b739d6272a500..4515ae92f66402b5055c0bd7b79cbd3370b3897c 100644 (file)
@@ -241,7 +241,7 @@ void WM_main_remove_notifier_reference(const void *reference)
        }
 }
 
-void WM_main_remove_editor_id_reference(const ID *id)
+void WM_main_remap_editor_id_reference(ID *old_id, ID *new_id)
 {
        Main *bmain = G.main;
        bScreen *sc;
@@ -253,7 +253,7 @@ void WM_main_remove_editor_id_reference(const ID *id)
                        SpaceLink *sl;
 
                        for (sl = sa->spacedata.first; sl; sl = sl->next) {
-                               ED_spacedata_id_unref(sl, id);
+                               ED_spacedata_id_remap(sa, sl, old_id, new_id);
                        }
                }
        }