diff --git a/pd/src/g_text.c b/pd/src/g_text.c index 06fdf4937e8d618ee9f3e03b8a2572494b146f13..67ea85a372f56edb870e5b9f2cf4d6b5f67fe7ed 100644 --- a/pd/src/g_text.c +++ b/pd/src/g_text.c @@ -2384,7 +2384,6 @@ void text_setto(t_text *x, t_glist *glist, char *buf, int bufsize, int pos) //probably don't need this here, but doesn't hurt to leave it in glob_preset_node_list_seek_hub(); - glob_preset_node_list_check_loc_and_update(); } } diff --git a/pd/src/g_undo.c b/pd/src/g_undo.c index 9083bdfeef74ee9bd68de63938b2b7d4e5ca786a..6356b7841140be164d23cdb98f18fb70b4c799ea 100644 --- a/pd/src/g_undo.c +++ b/pd/src/g_undo.c @@ -89,6 +89,7 @@ void canvas_undo_undo(t_canvas *x) their regular call will fail in case their position needed to be updated by undo/redo first to reflect the old one */ glob_preset_node_list_seek_hub(); + glob_preset_node_list_check_loc_and_update(); if (glist_isvisible(x) && glist_istoplevel(x)) { sys_vgui("pdtk_undomenu .x%lx %s %s\n", @@ -133,6 +134,7 @@ void canvas_undo_redo(t_canvas *x) regular call will fail in case their position needed to be updated by undo/redo first to reflect the old one */ glob_preset_node_list_seek_hub(); + glob_preset_node_list_check_loc_and_update(); if (glist_isvisible(x) && glist_istoplevel(x)) { sys_vgui("pdtk_undomenu .x%lx %s %s\n", diff --git a/pd/src/x_preset.c b/pd/src/x_preset.c index 31c5cd26c54c9445e7c27474713e6dc78114b306..8b2ef0ec9aed8bafd8a337f82aaa8f916098e420 100644 --- a/pd/src/x_preset.c +++ b/pd/src/x_preset.c @@ -656,7 +656,7 @@ void preset_node_clear(t_preset_node *x, t_float f) { np1 = hd2->phd_npreset; // if it is first one - if (np1->np_preset == (int)f) + if (np1 && np1->np_preset == (int)f) { hd2->phd_npreset = np1->np_next; if (np1->np_val.l_n) @@ -687,13 +687,12 @@ void preset_node_clear(t_preset_node *x, t_float f) } } } + SETFLOAT(ap+0, f); + SETFLOAT(ap+1, (t_float)changed); + outlet_anything(x->pn_hub->ph_outlet, gensym("node_clear"), 2, ap); } - if (changed && !x->pn_hub->ph_extern_file) + if (changed && (!x->pn_hub || !x->pn_hub->ph_extern_file)) canvas_dirty(x->pn_hub->ph_canvas, 1); - - SETFLOAT(ap+0, f); - SETFLOAT(ap+1, (t_float)changed); - outlet_anything(x->pn_hub->ph_outlet, gensym("node_clear"), 2, ap); }