Commit f47f9385 authored by Ivica Ico Bukvic's avatar Ivica Ico Bukvic
Browse files

fixed three regressions that crept in due to implementation of moving gop...

fixed three regressions that crept in due to implementation of moving gop objects by tag. one of them manifested itself when an object was altered as gop and a sub-patch pops up asking to discard changes made to it. upon returning on the main window with the said gop, due to redraw objects were not reselected so dragging the object would not redraw properly even though it could be displaced, resulting in a seemingly stale gop object (in actuality it was simply displaced by being dragged while its visual content did not displace). Also, excessive stdout errors regarding redrawing gop resize handles and possible menu edit update has been dealt with.
parent f7bf51a2
......@@ -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
......
......@@ -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);
......
......@@ -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#######################
......
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