From f7354119cc8089dd7a788bacec0259db14bf07b8 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Thu, 15 Feb 2018 15:45:08 +1300 Subject: Fix more missing ID remapping in animation editor callbacks Applying the same fixes as introduced in 98d797b67c07e85889768bf8ecde292e9e6f70e9 this time, for the Graph and NLA editors --- source/blender/editors/space_graph/space_graph.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source/blender/editors/space_graph/space_graph.c') diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c index f12db310856..df6de83336d 100644 --- a/source/blender/editors/space_graph/space_graph.c +++ b/source/blender/editors/space_graph/space_graph.c @@ -683,13 +683,12 @@ static void graph_id_remap(ScrArea *UNUSED(sa), SpaceLink *slink, ID *old_id, ID { SpaceIpo *sgraph = (SpaceIpo *)slink; - if (!ELEM(GS(old_id->name), ID_GR)) { - return; - } - if (sgraph->ads && (ID *)sgraph->ads->filter_grp == old_id) { sgraph->ads->filter_grp = (Group *)new_id; } + if ((ID *)sgraph->ads->source == old_id) { + sgraph->ads->source = new_id; + } } /* only called once, from space/spacetypes.c */ -- cgit v1.2.3