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:
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user