diff --git a/pd/src/x_preset.c b/pd/src/x_preset.c index bccaac395d7a9d16cd20ca47b435ce8ed2f88ce1..b31e289bb1b849d3036f33e8a8505ac044f0f38d 100644 --- a/pd/src/x_preset.c +++ b/pd/src/x_preset.c @@ -46,6 +46,7 @@ //==================== forward declarations ========================// void preset_hub_add_a_node(t_preset_hub *h, t_preset_node *x); +void preset_hub_dirty(t_preset_hub *h); void preset_hub_recall(t_preset_hub *h, t_float f); void preset_hub_store(t_preset_hub *h, t_float f); void preset_hub_delete_a_node(t_preset_hub *h, t_preset_node *x); @@ -550,7 +551,8 @@ static void preset_node_anything(t_preset_node *x, t_symbol *s, int argc, t_atom break; } } - + if (x->pn_hub) + preset_hub_dirty(x->pn_hub); } //======== following functions are for interaction with the hub/pd =======// @@ -997,6 +999,13 @@ void preset_hub_bang(t_preset_hub *x) outlet_anything(x->ph_outlet, gensym("current"), 1, ap); } +void preset_hub_dirty(t_preset_hub *x) +{ + t_atom ap[1]; + SETFLOAT(ap+0, (t_float)1); + outlet_anything(x->ph_outlet, gensym("dirty"), 1, ap); +} + void preset_hub_recall(t_preset_hub *x, t_float f) { if(PH_DEBUG) fprintf(stderr,"hub_recall\n");