From ae4e9dc64e7e4281aed8228ed49cc2c6c8932549 Mon Sep 17 00:00:00 2001 From: msp Date: Tue, 17 Aug 2010 17:31:34 -0700 Subject: [PATCH] attempted fix to gop-save-crash bug (addressed in patch 2913280 but fixed differently) --- src/d_delay.c | 2 -- src/g_editor.c | 13 ++++++------- src/g_graph.c | 3 +-- src/notes.txt | 1 + 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/d_delay.c b/src/d_delay.c index d36f349dce..a6e5f7cf58 100644 --- a/src/d_delay.c +++ b/src/d_delay.c @@ -108,8 +108,6 @@ static t_int *sigdelwrite_perform(t_int *w) phase -= nsamps; } } - bp = vp + c->c_phase; - c->c_phase = phase; return (w+4); } diff --git a/src/g_editor.c b/src/g_editor.c index 10190dc213..736d1512f4 100644 --- a/src/g_editor.c +++ b/src/g_editor.c @@ -716,7 +716,7 @@ static void glist_doreload(t_glist *gl, t_symbol *name, t_symbol *dir, { t_gobj *g; int i, nobj = glist_getindex(gl, 0); /* number of objects */ - int hadwindow = gl->gl_havewindow; + int hadwindow = (gl->gl_editor != 0); for (g = gl->gl_list, i = 0; g && i < nobj; i++) { if (g != except && pd_class(&g->g_pd) == canvas_class && @@ -729,8 +729,10 @@ static void glist_doreload(t_glist *gl, t_symbol *name, t_symbol *dir, replacement will be at the end of the list, so we don't do g = g->g_next in this case. */ int j = glist_getindex(gl, g); - if (!gl->gl_havewindow) - canvas_vis(glist_getcanvas(gl), 1); + if (!gl->gl_editor) + canvas_vis(gl, 1); + if (!gl->gl_editor) + bug("editor"); glist_noselect(gl); glist_select(gl, g); canvas_setundo(gl, canvas_undo_cut, @@ -747,7 +749,7 @@ static void glist_doreload(t_glist *gl, t_symbol *name, t_symbol *dir, g = g->g_next; } } - if (!hadwindow && gl->gl_havewindow) + if (!hadwindow && gl->gl_editor) canvas_vis(glist_getcanvas(gl), 0); } @@ -924,9 +926,6 @@ void canvas_vis(t_canvas *x, t_floatarg f) { char buf[30]; int flag = (f != 0); - /* why is this here, what's the problem? This gets triggered by GOPs */ - if (x != glist_getcanvas(x)) - bug("canvas_vis"); if (flag) { /* If a subpatch/abstraction has GOP/gl_isgraph set, then it will have diff --git a/src/g_graph.c b/src/g_graph.c index 2b18203d39..04595cd02e 100644 --- a/src/g_graph.c +++ b/src/g_graph.c @@ -176,8 +176,7 @@ void glist_grab(t_glist *x, t_gobj *y, t_glistmotionfn motionfn, t_canvas *glist_getcanvas(t_glist *x) { - while (x->gl_owner && !x->gl_havewindow && x->gl_isgraph && - gobj_shouldvis(&x->gl_gobj, x->gl_owner)) + while (x->gl_owner && !x->gl_havewindow && x->gl_isgraph) x = x->gl_owner; return((t_canvas *)x); } diff --git a/src/notes.txt b/src/notes.txt index d4bf30295f..f9bf2dd817 100644 --- a/src/notes.txt +++ b/src/notes.txt @@ -2,6 +2,7 @@ font courier not found? carriage returns after posting lose makesfx.bat, etc. from msw (and move out personal stuff?) control C control +window titles wrong on Macintosh ---------------- dolist --------------------