diff --git a/src/g_editor.c b/src/g_editor.c index bf45c682510afe0eecf7bb29b2aa93d9b391de7e..30f4f55f6f82c14df645f5820b6f91d717ce8a01 100644 --- a/src/g_editor.c +++ b/src/g_editor.c @@ -4474,20 +4474,21 @@ void canvas_editmode(t_canvas *x, t_floatarg fyesplease) magicGlass_unbind(x->gl_magic_glass); magicGlass_hide(x->gl_magic_glass); } - // end jsarlo + // end jsarlo + //dpsaha@vt.edu called to delete the GOP_blob + if (x->gl_goprect) canvas_draw_gop_resize_hooks(x); } canvas_setcursor(x, CURSOR_RUNMODE_NOTHING); } - sys_vgui("pdtk_canvas_editval .x%lx %d\n", - glist_getcanvas(x), x->gl_edit); + if (glist_isvisible(x)) + sys_vgui("pdtk_canvas_editval .x%lx %d\n", + glist_getcanvas(x), x->gl_edit); /*if (!x->gl_edit) { sys_vgui(".x%lx.m.edit entryconfigure \"Cord Inspector\" -indicatoron false -state disabled\n", glist_getcanvas(x)); } else { sys_vgui(".x%lx.m.edit entryconfigure \"Cord Inspector\" -indicatoron false -state normal\n", glist_getcanvas(x)); }*/ - //dpsaha@vt.edu called to delete the GOP_blob - if (x->gl_goprect) canvas_draw_gop_resize_hooks(x); } // jsarlo diff --git a/src/g_graph.c b/src/g_graph.c index 529ad5e783c284c94ce59b52f7db736e3724ac46..ce33148c10e9b3f59282c47c21705b6a88efcbd5 100644 --- a/src/g_graph.c +++ b/src/g_graph.c @@ -917,6 +917,9 @@ static void graph_vis(t_gobj *gr, t_glist *parent_glist, int vis) for (g = x->gl_list; g; g = g->g_next) { gobj_vis(g, x, 1); } + /* reselect it upon redrawing if it was selected before */ + if (glist_isselected(parent_glist, gr)) + gobj_select(gr, parent_glist, 1); } else { @@ -1050,6 +1053,7 @@ static void graph_getrect(t_gobj *z, t_glist *glist, static void graph_displace_withtag(t_gobj *z, t_glist *glist, int dx, int dy) { + //fprintf(stderr,"graph_displace_withtag %d %d\n", dx, dy); t_glist *x = (t_glist *)z; if (!x->gl_isgraph) text_widgetbehavior.w_displacefnwtag(z, glist, dx, dy); @@ -1063,6 +1067,7 @@ static void graph_displace_withtag(t_gobj *z, t_glist *glist, int dx, int dy) static void graph_displace(t_gobj *z, t_glist *glist, int dx, int dy) { + //fprintf(stderr,"graph_displace %d %d\n", dx, dy); t_glist *x = (t_glist *)z; if (!x->gl_isgraph) text_widgetbehavior.w_displacefn(z, glist, dx, dy); @@ -1084,7 +1089,7 @@ static void graph_displace(t_gobj *z, t_glist *glist, int dx, int dy) static void graph_select(t_gobj *z, t_glist *glist, int state) { - //fprintf(stderr,"graph_select .x%lx...\n", (t_int)z); + //fprintf(stderr,"graph_select .x%lx %d...\n", (t_int)z, state); t_glist *x = (t_glist *)z; if (!x->gl_isgraph) text_widgetbehavior.w_selectfn(z, glist, state); diff --git a/src/pd.tk b/src/pd.tk index cf9cb19dde937bf40ccb6d9f6533a12e045a7a27..60b430826e2d63ea0bc226c38b8b3400ceb0615c 100644 --- a/src/pd.tk +++ b/src/pd.tk @@ -5091,12 +5091,13 @@ proc pdtk_data_dialog {name stuff} { #####################iemlib####################### proc pdtk_canvas_editval {name value} { #global colors - - if { $value } { - $name.m.edit entryconfigure "Edit mode" -indicatoron false -background "#7dd37d" - } else { - $name.m.edit entryconfigure "Edit mode" -indicatoron false -background {} - } + #if {[winfo exists $name]} { + if { $value } { + $name.m.edit entryconfigure "Edit mode" -indicatoron false -background "#7dd37d" + } else { + $name.m.edit entryconfigure "Edit mode" -indicatoron false -background {} + } + #} } #####################iemlib#######################