From a01e81cf7d0ed4379c20bd5f331512e9d31871fe Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Sun, 23 Jul 2006 08:49:19 +0000 Subject: [PATCH] Bugfix #4699 Missing dependency graph update on establishing a new relationship between a static particle system and a curve guide, with the pulldown button in the "Fields and Deflection" panel. --- source/blender/src/buttons_object.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index c7e099a65ea..2e8c9bef420 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -1906,16 +1906,20 @@ void do_effects_panels(unsigned short event) } break; case B_FIELD_DEP: - DAG_scene_sort(G.scene); - DAG_object_flush_update(G.scene, ob, OB_RECALC_OB); + /* do this before scene sort, that one checks for CU_PATH */ if(ob->type==OB_CURVE && ob->pd->forcefield==PFIELD_GUIDE) { Curve *cu= ob->data; cu->flag |= (CU_PATH|CU_3D); do_curvebuts(B_CU3D); /* all curves too */ - - DAG_object_flush_update(G.scene, OBACT, OB_RECALC_DATA); } + DAG_scene_sort(G.scene); + + if(ob->type==OB_CURVE && ob->pd->forcefield==PFIELD_GUIDE) + DAG_object_flush_update(G.scene, ob, OB_RECALC); + else + DAG_object_flush_update(G.scene, ob, OB_RECALC_OB); + allqueue(REDRAWVIEW3D, 0); allqueue(REDRAWBUTSOBJECT, 0); break;