From 48a9cbe461123768a62060fd8e8c2ee6730b2f8d Mon Sep 17 00:00:00 2001 From: Ivica Ico Bukvic <ico@vt.edu> Date: Sat, 16 Aug 2014 01:12:32 -0400 Subject: [PATCH] *added selected tag to scalehandles since they should only appear when things are selected (or as is the case with GOP, when nothing else is selected) *fixed regression in number2 where after dialog it requires complete redraw --- pd/src/g_all_guis.c | 4 ++-- pd/src/g_numbox.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pd/src/g_all_guis.c b/pd/src/g_all_guis.c index 7785aedd4..0d1b1ccaa 100644 --- a/pd/src/g_all_guis.c +++ b/pd/src/g_all_guis.c @@ -658,9 +658,9 @@ void scalehandle_draw_select(t_scalehandle *h, t_glist *canvas, int px, int py) sys_vgui("canvas %s -width %d -height %d -bg $pd_colors(selection) -bd 0 " "-cursor %s\n", h->h_pathname, sx, sy, cursor); if (h->h_scale) { - sprintf(tags,"x%lx %lxSCALE iemgui", (long)x,(long)x); + sprintf(tags,"x%lx %lxSCALE iemgui selected", (long)x,(long)x); } else { - sprintf(tags,"x%lx %lx%s iemgui", (long)x, + sprintf(tags,"x%lx %lx%s iemgui selected", (long)x, (long)x,pd_class((t_pd *)x)==canvas_class?"MOVE":"LABELH"); } sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d " diff --git a/pd/src/g_numbox.c b/pd/src/g_numbox.c index 2de66bdcc..9d0750584 100644 --- a/pd/src/g_numbox.c +++ b/pd/src/g_numbox.c @@ -468,8 +468,8 @@ static void my_numbox_dialog(t_my_numbox *x, t_symbol *s, int argc, iemgui_dialog(&x->x_gui, argc, argv); x->x_numwidth = my_numbox_calc_fontwidth(x); my_numbox_check_minmax(x, min, max); - x->x_gui.x_draw(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_CONFIG); - x->x_gui.x_draw(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_MOVE); + iemgui_draw_erase(&x->x_gui, x->x_gui.x_glist); + iemgui_shouldvis(&x->x_gui, IEM_GUI_DRAW_MODE_NEW); scalehandle_draw(&x->x_gui, x->x_gui.x_glist); iemgui_label_draw_new(&x->x_gui, x->x_gui.x_glist); if (x->x_gui.x_selected) -- GitLab