aboutsummaryrefslogtreecommitdiff
path: root/pd/src/g_editor.c
diff options
context:
space:
mode:
authorMiller Puckette <millerpuckette@users.sourceforge.net>2005-07-08 00:02:45 +0000
committerMiller Puckette <millerpuckette@users.sourceforge.net>2005-07-08 00:02:45 +0000
commit6efb16b9040f7ba6db8c60559e0c815d54f05c43 (patch)
treec6630f3740272735d3a25f8b761dc8aa76cd6d25 /pd/src/g_editor.c
parentdb7bcd346529c35eee37d356138c971f32e3f795 (diff)
Bug fixes: took out some unwanted "red rectangle" apparitions when making
arrays on new canvases; got the array dialog to come back; made graphical updating a bit more reliable. Tested and fixed a couple of problems on Mac and Windoes. svn path=/trunk/; revision=3300
Diffstat (limited to 'pd/src/g_editor.c')
-rw-r--r--pd/src/g_editor.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/pd/src/g_editor.c b/pd/src/g_editor.c
index fbf0097a..a4bfa1e6 100644
--- a/pd/src/g_editor.c
+++ b/pd/src/g_editor.c
@@ -853,11 +853,14 @@ void canvas_setgraph(t_glist *x, int flag, int nogoprect)
}
}
+void garray_properties(t_garray *x);
+
/* tell GUI to create a properties dialog on the canvas. We tell
the user the negative of the "pixel" y scale to make it appear to grow
naturally upward, whereas pixels grow downward. */
void canvas_properties(t_glist *x)
{
+ t_gobj *y;
char graphbuf[200];
if (glist_isgraph(x) != 0)
sprintf(graphbuf,
@@ -875,6 +878,10 @@ void canvas_properties(t_glist *x)
(int)x->gl_pixwidth, (int)x->gl_pixheight,
(int)x->gl_xmargin, (int)x->gl_ymargin);
gfxstub_new(&x->gl_pd, x, graphbuf);
+ /* if any arrays are in the graph, put out their dialogs too */
+ for (y = x->gl_list; y; y = y->g_next)
+ if (pd_class(&y->g_pd) == garray_class)
+ garray_properties((t_garray *)y);
}
/* called from the gui when "OK" is selected on the canvas properties
@@ -946,7 +953,9 @@ static void canvas_donecanvasdialog(t_glist *x,
}
/* LATER avoid doing 2 redraws here (possibly one inside setgraph) */
canvas_setgraph(x, graphme, 0);
- canvas_redraw(x);
+ if (x->gl_havewindow)
+ canvas_redraw(x);
+ else gobj_redraw(&x->gl_gobj, x->gl_owner);
}
/* called from the gui when a popup menu comes back with "properties,"