Commit 44cea8bb authored by Ivica Bukvic's avatar Ivica Bukvic
Browse files

*further improvements on the garray selection and redraw--fixed garray...

*further improvements on the garray selection and redraw--fixed garray contents not remaining selected after dialog properties have been applied
*still need to explore problems with multiple arrays in a single GOP
parent 9345780d
......@@ -11,6 +11,8 @@
extern int glob_lmclick;
static void garray_select(t_gobj *z, t_glist *glist, int state);
/* jsarlo { */
#define ARRAYPAGESIZE 1000 /* this should match the page size in u_main.tk */
/* } jsarlo */
......@@ -92,7 +94,7 @@ void array_resize(t_array *x, int n)
static void array_resize_and_redraw(t_array *array, t_glist *glist, int n)
{
//fprintf(stderr,"array_resize_and_redraw\n");
fprintf(stderr,"array_resize_and_redraw\n");
t_array *a2 = array;
int vis = glist_isvisible(glist);
while (a2->a_gp.gp_stub->gs_which == GP_ARRAY)
......@@ -486,7 +488,7 @@ void glist_arraydialog(t_glist *parent, t_symbol *s, int argc, t_atom *argv)
canvas_dirty(parent, 1);
//canvas_redraw(glist_getcanvas(parent));
garray_fittograph(a, (int)size, 1);
garray_fittograph(a, (int)size, -1);
sys_vgui("pdtk_canvas_getscroll .x%lx.c\n",
(long unsigned int)glist_getcanvas(parent));
}
......@@ -604,6 +606,7 @@ void garray_arraydialog(t_garray *x, t_symbol *s, int argc, t_atom *argv)
x->x_style = style;
//fprintf(stderr,"GARRAY_REDRAW\n");
garray_redraw(x);
garray_select((t_gobj *)x,glist_getcanvas(x->x_glist),1);
canvas_dirty(x->x_glist, 1);
}
}
......@@ -1408,8 +1411,8 @@ void garray_redraw(t_garray *x)
{
//fprintf(stderr,"garray_redraw\n");
if (glist_isvisible(x->x_glist))
sys_queuegui(&x->x_gobj, x->x_glist, garray_doredraw);
//garray_doredraw(&x->x_gobj, x->x_glist);
//sys_queuegui(&x->x_gobj, x->x_glist, garray_doredraw);
garray_doredraw(&x->x_gobj, x->x_glist);
/* jsarlo { */
/* this happens in garray_vis() when array is visible for
performance reasons */
......
......@@ -1181,7 +1181,7 @@ void canvas_closebang(t_canvas *x)
/* needed for readjustment of garrays */
extern t_array *garray_getarray(t_garray *x);
extern void garray_fittograph(t_garray *x, int n, int redraw);
extern void garray_fittograph(t_garray *x, int n, int flag);
extern t_rtext *glist_findrtext(t_glist *gl, t_text *who);
extern void rtext_gettext(t_rtext *x, char **buf, int *bufsize);
......
......@@ -2344,7 +2344,7 @@ void canvas_map(t_canvas *x, t_floatarg f);
in front of all windows; or with "f" zero, when we want to get rid of
the window. */
//extern t_array *garray_getarray(t_garray *x);
//extern void garray_fittograph(t_garray *x, int n, int redraw);
//extern void garray_fittograph(t_garray *x, int n, int flag);
//extern t_rtext *glist_findrtext(t_glist *gl, t_text *who);
//extern void rtext_gettext(t_rtext *x, char **buf, int *bufsize);
......
......@@ -607,8 +607,8 @@ static void graph_bounds(t_glist *x, t_floatarg x1, t_floatarg y1,
x->gl_x2 = x2;
x->gl_y1 = y1;
x->gl_y2 = y2;
if (!do_not_redraw)
glist_redraw(x);
//if (!do_not_redraw)
glist_redraw(x);
}
}
......@@ -1049,6 +1049,7 @@ static void graph_vis(t_gobj *gr, t_glist *parent_glist, int vis)
tag, x1, y1, x2, y2);
if (glist_isselected(parent_glist, gr))
gobj_select(gr, parent_glist, 1);
//fprintf(stderr,"******************graph_vis SELECT\n");
}
else
{
......
Markdown is supported
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