diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2017-09-20 21:24:54 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2017-09-20 21:26:40 +0300 |
commit | 98d797b67c07e85889768bf8ecde292e9e6f70e9 (patch) | |
tree | e0740a51ed25262d3b76b6ad21e2b8e8f30e300c | |
parent | 18a353dd242225a9a7a6e101b9c128f94d03d770 (diff) |
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.
-rw-r--r-- | source/blender/editors/space_action/space_action.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c index 83655a2ba9e..5cde224b7dc 100644 --- a/source/blender/editors/space_action/space_action.c +++ b/source/blender/editors/space_action/space_action.c @@ -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 */ |