Commit ca07227c authored by Ivica Bukvic's avatar Ivica Bukvic
Browse files

*fixed scalehandle regression from the last Mathieu's refactoring commit

*cosmetic fixes to g_canvas.c
parent 03c4dc00
......@@ -641,8 +641,10 @@ void scalehandle_bind(t_scalehandle *h) {
// but in the case of canvas, the "iemgui" tag is added (it wasn't the case originally)
void scalehandle_draw_select(t_scalehandle *h, int px, int py) {
char tags[128]; // BNG may need up to 100 chars in 64-bit mode, for example
t_iemgui *x = (t_iemgui *)h->h_master;
t_canvas *canvas=glist_getcanvas(x->x_glist);
// casting x as t_object so that it can work both with t_glist (GOP scalehandles)
// and t_iemgui (iemgui scalehandles)
t_object *x = (t_object *)h->h_master;
t_canvas *canvas=glist_getcanvas(h->h_glist);
//int px,py;
//t_class *c = pd_class((t_pd *)x);
......@@ -672,14 +674,14 @@ void scalehandle_draw_select(t_scalehandle *h, int px, int py) {
sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d "
"-window %s -tags {%s}\n", canvas,
x->x_obj.te_xpix+px-sx, x->x_obj.te_ypix+py-sy, sx, sy,
x->te_xpix+px-sx, x->te_ypix+py-sy, sx, sy,
h->h_pathname, tags);
h->h_vis = 1;
/* not yet (this is not supported by current implementation) */
/* not yet (this is not supported by the current implementation) */
}/* else {
sys_vgui(".x%x.c coords %s %d %d\n", canvas, h->h_pathname,
x->x_obj.te_xpix+px-sx, x->x_obj.te_ypix+py-sy);
x->te_xpix+px-sx, x->te_ypix+py-sy);
sys_vgui("raise %s\n", h->h_pathname);
......@@ -1031,6 +1033,7 @@ void iemgui_draw_update(t_iemgui *x, t_glist *glist) {
void iemgui_draw_new(t_iemgui *x) {
x->x_draw(x, x->x_glist, IEM_GUI_DRAW_MODE_NEW);
canvas_raise_all_cords(glist_getcanvas(x->x_glist)); // used to be inside x_draw
......@@ -706,8 +706,7 @@ void canvas_draw_gop_resize_hooks(t_canvas* x)
x->gl_goprect && !x->gl_editor->e_selection)
//Drawing and Binding Resize_Blob for GOP
//fprintf(stderr,"draw_gop_resize_hooks DRAW %lx %lx\n",
// (t_int)x, (t_int)glist_getcanvas(x));
//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);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment