Fix more missing ID remapping in animation editor callbacks

Applying the same fixes as introduced in 98d797b67c
this time, for the Graph and NLA editors
This commit is contained in:
Joshua Leung
2018-02-15 15:45:08 +13:00
parent 2945831630
commit f7354119cc
2 changed files with 6 additions and 8 deletions

View File

@@ -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 */

View File

@@ -506,13 +506,12 @@ static void nla_id_remap(ScrArea *UNUSED(sa), SpaceLink *slink, ID *old_id, ID *
{
SpaceNla *snla = (SpaceNla *)slink;
if (!ELEM(GS(old_id->name), ID_GR)) {
return;
}
if ((ID *)snla->ads->filter_grp == old_id) {
snla->ads->filter_grp = (Group *)new_id;
}
if ((ID *)snla->ads->source == old_id) {
snla->ads->source = new_id;
}
}
/* only called once, from space/spacetypes.c */