From 4c43fc053e94722ef992e3282ad2e6ad3c8c602d Mon Sep 17 00:00:00 2001 From: Ivica Ico Bukvic <ico@vt.edu> Date: Tue, 12 Aug 2014 12:21:38 -0400 Subject: [PATCH] *made sure that iemgui labels are only drawn selected if they are on parent canvas *cleaned up formatting to make source more legible --- pd/src/g_all_guis.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pd/src/g_all_guis.c b/pd/src/g_all_guis.c index b62371ee2..e2721588a 100644 --- a/pd/src/g_all_guis.c +++ b/pd/src/g_all_guis.c @@ -945,10 +945,12 @@ void iemgui_label_draw_new(t_iemgui *x, t_glist *canvas, int xpos, int ypos, con iemgui_font(x), x->x_fontsize, sys_fontweight, x->x_lcol, x, x, nlet_tag); } + void iemgui_label_draw_move(t_iemgui *x, t_glist *canvas, int xpos, int ypos) { sys_vgui(".x%lx.c coords %lxLABEL %d %d\n", canvas, x, xpos+x->x_ldx, ypos+x->x_ldy); } + void iemgui_label_draw_config(t_iemgui *x, t_glist *canvas) { if (x->x_selected && x->x_glist == canvas) sys_vgui(".x%lx.c itemconfigure %lxLABEL -font {{%s} -%d %s} " @@ -961,8 +963,9 @@ void iemgui_label_draw_config(t_iemgui *x, t_glist *canvas) { canvas, x, iemgui_font(x), x->x_fontsize, sys_fontweight, x->x_lcol, x->x_lab!=s_empty?x->x_lab->s_name:""); } + void iemgui_label_draw_select(t_iemgui *x, t_glist *canvas) { - if(x->x_selected) + if (x->x_selected && x->x_glist == canvas) sys_vgui(".x%lx.c itemconfigure %lxLABEL " "-fill $pd_colors(selection)\n", canvas, x); else -- GitLab