diff --git a/src/g_canvas.c b/src/g_canvas.c index e7271b67bb57d2d521fc82e9a4e20626a43b3730..699e40032a1a4cdfaf3b265f9321e8078f451fe9 100644 --- a/src/g_canvas.c +++ b/src/g_canvas.c @@ -719,7 +719,7 @@ void canvas_dirty(t_canvas *x, t_floatarg n) /*********** dpsaha@vt.edu resize move hooks ****************/ void canvas_draw_gop_resize_hooks(t_canvas* x) { - if(x->gl_edit){ + if(x->gl_edit && glist_isvisible(x) && glist_istoplevel(x) && x->gl_goprect && !x->gl_editor->e_selection) { //Drawing and Binding Resize_Blob for GOP t_scalehandle *sh = (t_scalehandle *)(x->x_handle); @@ -761,8 +761,7 @@ void canvas_draw_gop_resize_hooks(t_canvas* x) } else{ - sys_vgui(".x%lx.c delete GOP_resblob\n",x); //delete the GOP_resblob - sys_vgui(".x%lx.c delete GOP_movblob\n",x); //delete the GOP_movblob + sys_vgui("catch { .x%lx.c delete GOP_resblob ; .x%lx.c delete GOP_movblob ; } \n", x, x); //delete the GOP_resblob and GOP_movblob } } /*****************************************************************************/ diff --git a/src/g_editor.c b/src/g_editor.c index 1834d1923a152f9462698b9f567f3ef9214065d9..5fcacc135f484f1fa2e145220b755e9c90c8c023 100644 --- a/src/g_editor.c +++ b/src/g_editor.c @@ -57,6 +57,7 @@ static void canvas_dofont(t_canvas *x, t_floatarg font, t_floatarg xresize, t_floatarg yresize); extern void canvas_setbounds(t_canvas *x, int x1, int y1, int x2, int y2); int canvas_apply_restore_original_position(t_canvas *x, int orig_pos); +extern void canvas_draw_gop_resize_hooks(t_canvas *x); struct _outlet { @@ -208,6 +209,7 @@ void glist_selectline(t_glist *x, t_outconnect *oc, int index1, sys_vgui(".x%lx.c addtag selected withtag l%lx\n", glist_getcanvas(x), x->gl_editor->e_selectline_tag); c_selection = x; + canvas_draw_gop_resize_hooks(x); } } @@ -232,6 +234,7 @@ void glist_deselectline(t_glist *x) (issignal ? "$signal_cord" : "$msg_cord")); sys_vgui(".x%lx.c dtag l%lx selected\n", glist_getcanvas(x), glist_getcanvas(x)->gl_editor->e_selectline_tag); + canvas_draw_gop_resize_hooks(x); } } @@ -266,6 +269,7 @@ void glist_select(t_glist *x, t_gobj *y) c_selection = x; sys_vgui("pdtk_canvas_update_edit_menu .x%lx 1\n", x); + canvas_draw_gop_resize_hooks(x); } } @@ -356,6 +360,7 @@ void glist_deselect(t_glist *x, t_gobj *y) canvas_resume_dsp(1); if (!x->gl_editor->e_selection) sys_vgui("pdtk_canvas_update_edit_menu .x%lx 0\n", x); + canvas_draw_gop_resize_hooks(x); } reenter = 0; } @@ -373,6 +378,7 @@ void glist_noselect(t_glist *x) glist_deselectline(x); if (c_selection == x) c_selection = NULL; + canvas_draw_gop_resize_hooks(x); } } @@ -399,6 +405,7 @@ void glist_selectall(t_glist *x) sel->sel_next = 0; c_selection = x; } + canvas_draw_gop_resize_hooks(x); } } @@ -4453,8 +4460,6 @@ void glob_key(void *dummy, t_symbol *s, int ac, t_atom *av) canvas_key(canvas_editing, s, ac, av); } -extern void canvas_draw_gop_resize_hooks(t_canvas *x); - void canvas_editmode(t_canvas *x, t_floatarg fyesplease) { //fprintf(stderr,"canvas_editmode %f\n", fyesplease);