diff --git a/pd/src/g_all_guis.c b/pd/src/g_all_guis.c index 4a9a926c03e0d663feabeed4529bba4fd8941624..ed0bdb28c7ae5cbf2a67fd42bd020c15e49a75df 100644 --- a/pd/src/g_all_guis.c +++ b/pd/src/g_all_guis.c @@ -699,7 +699,9 @@ void scalehandle_draw_select2(t_iemgui *x, t_glist *canvas) { void scalehandle_draw_erase(t_scalehandle *h, t_glist *canvas) { if (!h->h_vis) return; sys_vgui("destroy %s\n", h->h_pathname); - sys_vgui(".x%lx.c delete %lx%s\n", canvas, h->h_master, h->h_scale ? "SCALE" : "LABELH"); + sys_vgui(".x%lx.c delete %lx%s\n", canvas, h->h_master, + h->h_scale ? "SCALE" : pd_class((t_pd *)h->h_master)==canvas_class?"MOVE":"LABELH"); + h->h_vis = 0; } void scalehandle_draw_erase2(t_iemgui *x, t_glist *canvas) { diff --git a/pd/src/g_canvas.c b/pd/src/g_canvas.c index 040ab1212bfa27502a50814f31974bc087a02867..01ff0014e3505144fa8777d88931190154be3260 100644 --- a/pd/src/g_canvas.c +++ b/pd/src/g_canvas.c @@ -699,17 +699,23 @@ void canvas_draw_gop_resize_hooks(t_canvas* x) { t_scalehandle *sh = (t_scalehandle *)(x->x_handle); t_scalehandle *mh = (t_scalehandle *)(x->x_mhandle); + //fprintf(stderr,"draw_gop_resize_hooks START\n"); //in case we are an array which does not initialize its hooks if (!sh || !mh) return; 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 - //fprintf(stderr,"draw_gop_resize_hooks %lx %lx\n", + //fprintf(stderr,"draw_gop_resize_hooks DRAW %lx %lx\n", // (t_int)x, (t_int)glist_getcanvas(x)); sprintf(sh->h_pathname, ".x%lx.h%lx", (t_int)x, (t_int)sh); sprintf(mh->h_pathname, ".x%lx.h%lx", (t_int)x, (t_int)mh); + // Need to reset handles' vis values because they are erased via map + // (when applying properties, for instance) + scalehandle_draw_erase(sh,x); + scalehandle_draw_erase(mh,x); + scalehandle_draw_select(sh,x, -1-x->gl_obj.te_xpix+x->gl_xmargin + x->gl_pixwidth, -1-x->gl_obj.te_ypix+x->gl_ymargin + x->gl_pixheight/*,GOP_resblob*/); @@ -719,6 +725,7 @@ void canvas_draw_gop_resize_hooks(t_canvas* x) } else { + //fprintf(stderr,"draw_gop_resize_hooks ERASE\n"); scalehandle_draw_erase(sh,x); scalehandle_draw_erase(mh,x); } @@ -2005,7 +2012,7 @@ void canvasgop__clickhook(t_scalehandle *sh, t_floatarg f, t_floatarg xxx, t_flo //scalehandle_draw_erase(sh,x); sys_vgui("lower %s\n", sh->h_pathname); //delete GOP_resblob when moving the whole GOP - sys_vgui(".x%lx.c delete GOP_resblob \n", x); + sys_vgui(".x%lx.c delete %lxSCALE\n", x, x); } sh->h_dragx = 0; sh->h_dragy = 0;