diff --git a/pd/src/g_all_guis.c b/pd/src/g_all_guis.c index a52a2bdc78c77ba6001066511e7b4ba6d75e30c5..1e715a147a1f8d7542f41c4f6e3172791a9bb251 100644 --- a/pd/src/g_all_guis.c +++ b/pd/src/g_all_guis.c @@ -808,7 +808,6 @@ void scalehandle_dragon_label(t_scalehandle *h, float mouse_x, float mouse_y) { h->h_dragx = dx; h->h_dragy = dy; - int properties = gfxstub_haveproperties((void *)x); if (properties) { @@ -817,21 +816,18 @@ void scalehandle_dragon_label(t_scalehandle *h, float mouse_x, float mouse_y) { properties_set_field_int(properties,"label.xy.x_entry",new_x); properties_set_field_int(properties,"label.xy.y_entry",new_y); } - x->x_ldx += dx; x->x_ldy += dy; - - if (glist_isvisible(x->x_glist)) { int xpos=text_xpix(&x->x_obj, x->x_glist); int ypos=text_ypix(&x->x_obj, x->x_glist); //iemgui_getrect_legacy_label(x, &xpos, &ypos); t_canvas *canvas=glist_getcanvas(x->x_glist); - sys_vgui(".x%lx.c coords %lxLABEL %d %d\n", canvas, x, - xpos+x->x_ldx + h->h_dragx, - ypos+x->x_ldy + h->h_dragy); + //sys_vgui(".x%lx.c coords %lxLABEL %d %d\n", canvas, x, + // xpos+x->x_ldx + h->h_dragx, + // ypos+x->x_ldy + h->h_dragy); gui_vmess("gui_iemgui_label_coords", "xxii", canvas, x, @@ -841,23 +837,6 @@ void scalehandle_dragon_label(t_scalehandle *h, float mouse_x, float mouse_y) { } } -void scalehandle_unclick_label(t_scalehandle *h) { - t_iemgui *x = (t_iemgui *)h->h_master; - canvas_apply_setundo(x->x_glist, (t_gobj *)x); - if (h->h_dragx || h->h_dragy) - { - x->x_ldx += h->h_dragx; - x->x_ldy += h->h_dragy; - canvas_dirty(x->x_glist, 1); - } - if (glist_isvisible(x->x_glist)) - { - iemgui_select((t_gobj *)x, x->x_glist, 1); - canvas_fixlinesfor(x->x_glist, (t_text *)x); - canvas_getscroll(x->x_glist); - } -} - void scalehandle_click_label(t_scalehandle *h) { t_iemgui *x = (t_iemgui *)h->h_master; if (glist_isvisible(x->x_glist)) @@ -943,8 +922,6 @@ static void scalehandle_motionhook(t_scalehandle *h, void iemgui__clickhook3(t_scalehandle *sh, int newstate) { if (!sh->h_dragon && newstate && sh->h_scale) scalehandle_click_scale(sh); - else if (sh->h_dragon && newstate == 0 && !sh->h_scale) - scalehandle_unclick_label(sh); else if (!sh->h_dragon && newstate && !sh->h_scale) scalehandle_click_label(sh); sh->h_dragon = newstate; diff --git a/pd/src/g_all_guis.h b/pd/src/g_all_guis.h index d446522fa4406ef532d93e17997dcc03f6a3add4..81549d3e194f97f19ae2c3c3e0fc3ffd134f3dfc 100644 --- a/pd/src/g_all_guis.h +++ b/pd/src/g_all_guis.h @@ -239,7 +239,6 @@ EXTERN t_scalehandle *scalehandle_new(t_object *x, t_glist *glist, int scale, t_ EXTERN void scalehandle_free(t_scalehandle *h); EXTERN void properties_set_field_int(long props, const char *gui_field, int value); EXTERN void scalehandle_dragon_label(t_scalehandle *h, float f1, float f2); -EXTERN void scalehandle_unclick_label(t_scalehandle *h); EXTERN void scalehandle_click_label(t_scalehandle *h); EXTERN void scalehandle_click_scale(t_scalehandle *h); EXTERN void scalehandle_unclick_scale(t_scalehandle *h); diff --git a/pd/src/g_canvas.c b/pd/src/g_canvas.c index e0c5011b1636405703c8198af8165e036fe910fc..64a5bb3e19c63c54ebb306376fee4673f5416e01 100644 --- a/pd/src/g_canvas.c +++ b/pd/src/g_canvas.c @@ -2131,6 +2131,8 @@ void canvasgop__clickhook(t_scalehandle *sh, int newstate) } else //enter if move_gop hook {// this block is similar to scalehandle_unclick_label but not enough + // We've actually removed scalehandle_unclick_label everywhere, so + // check to see whether this can be removed as well... canvas_undo_add(x, 8, "apply", canvas_undo_set_canvas(x)); if (sh->h_dragx || sh->h_dragy) {