Fix missing ID remapping in Action editor callback.

Spotted by Joshua Leung (@aligorith), thanks!

Should probably be backported to 2.79a should we do it.
This commit is contained in:
Bastien Montagne 2017-09-20 20:24:54 +02:00
parent 18a353dd24
commit 98d797b67c
Notes: blender-bot 2023-02-14 06:17:12 +01:00
Referenced by commit f7354119cc, Fix more missing ID remapping in animation editor callbacks
Referenced by issue #53683, 2.79a release
1 changed files with 6 additions and 2 deletions

View File

@ -624,13 +624,17 @@ static void action_id_remap(ScrArea *UNUSED(sa), SpaceLink *slink, ID *old_id, I
{
SpaceAction *sact = (SpaceAction *)slink;
if (!ELEM(GS(old_id->name), ID_GR)) {
return;
if ((ID *)sact->action == old_id) {
sact->action = (bAction *)new_id;
}
if ((ID *)sact->ads.filter_grp == old_id) {
sact->ads.filter_grp = (Group *)new_id;
}
if ((ID *)sact->ads.source == old_id) {
sact->ads.source = new_id;
}
}
/* only called once, from space/spacetypes.c */