Workspace: Move engines to workspace and Properties Editor cleanup
[blender.git] / source / blender / editors / space_action / space_action.c
index fca54b282f888523e95885d15ff0c201c456c402..50882571dad6c7a644cab22f4756e802a34f2421 100644 (file)
@@ -409,7 +409,8 @@ static void action_main_region_listener(
 
 /* editor level listener */
 static void action_listener(
-        bScreen *UNUSED(sc), ScrArea *sa, wmNotifier *wmn, const Scene *UNUSED(scene))
+        bScreen *UNUSED(sc), ScrArea *sa, wmNotifier *wmn, Scene *UNUSED(scene),
+        WorkSpace *UNUSED(workspace))
 {
        SpaceAction *saction = (SpaceAction *)sa->spacedata.first;
        
@@ -637,13 +638,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 */