Commit 08b8005a authored by Ivica Bukvic's avatar Ivica Bukvic
Browse files

fixed wrong color fill for selected gop object when opening gop-ed subpatch,...

fixed wrong color fill for selected gop object when opening gop-ed subpatch, incorrect selection of all scalars inside gop-ed patch when it is being edited as a toplevel window, and a bug where repeatedly opening already open gop-ed patch does not re-focus its toplevel window
parent b4d2d5c7
......@@ -820,22 +820,26 @@ void canvas_redraw(t_canvas *x)
own window. */
void glist_menu_open(t_glist *x)
{
if (glist_isvisible(x) && !glist_istoplevel(x))
if (glist_isvisible(x))
{
t_glist *gl2 = x->gl_owner;
if (!gl2)
bug("glist_menu_open"); /* shouldn't happen but not dangerous */
else
{
/* erase ourself in parent window */
gobj_vis(&x->gl_gobj, gl2, 0);
/* get rid of our editor (and subeditors) */
if (x->gl_editor)
canvas_destroy_editor(x);
x->gl_havewindow = 1;
/* redraw ourself in parent window (blanked out this time) */
gobj_vis(&x->gl_gobj, gl2, 1);
}
if (!glist_istoplevel(x)) {
t_glist *gl2 = x->gl_owner;
if (!gl2)
bug("glist_menu_open"); /* shouldn't happen but not dangerous */
else
{
/* erase ourself in parent window */
gobj_vis(&x->gl_gobj, gl2, 0);
/* get rid of our editor (and subeditors) */
if (x->gl_editor)
canvas_destroy_editor(x);
x->gl_havewindow = 1;
/* redraw ourself in parent window (blanked out this time) */
gobj_vis(&x->gl_gobj, gl2, 1);
}
} else {
sys_vgui("focus .x%lx\n", (t_int)x);
}
} else {
if (x->gl_editor)
canvas_destroy_editor(x);
......
......@@ -785,7 +785,7 @@ static void graph_vis(t_gobj *gr, t_glist *parent_glist, int vis)
if (vis && gobj_shouldvis(gr, parent_glist))
{
sys_vgui("catch {.x%lx.c create polygon\
%d %d %d %d %d %d %d %d %d %d -tags %s -fill #c0c0c0}\n",
%d %d %d %d %d %d %d %d %d %d -tags %s -fill $graph_outline}\n",
glist_getcanvas(x->gl_owner),
//parent_glist,
x1, y1, x1, y2, x2, y2, x2, y1, x1, y1, tag);
......@@ -1122,6 +1122,7 @@ static void graph_select(t_gobj *z, t_glist *glist, int state)
else //if(glist_istoplevel(glist))
{
//fprintf(stderr,"...yes\n");
//fprintf(stderr,"%lx %lx %lx\n", glist_getcanvas(glist), glist, x);
t_rtext *y = glist_findrtext(glist, &x->gl_obj);
if (canvas_showtext(x))
rtext_select(y, state);
......@@ -1141,7 +1142,7 @@ static void graph_select(t_gobj *z, t_glist *glist, int state)
*/
sys_vgui(".x%lx.c itemconfigure %s -fill %s\n",
canvas, rtext_gettag(y),
(state? "$select_color" : "black"));
(state? "$select_color" : "$graph_outline"));
}
t_gobj *g;
if (x->gl_list)
......
......@@ -230,7 +230,7 @@ static void scalar_select(t_gobj *z, t_glist *owner, int state)
template_notify(tmpl, (state ? gensym("select") : gensym("deselect")),
1, &at);
gpointer_unset(&gp);
sys_vgui("pdtk_select_all_gop_widgets .x%lx %lx %d\n", glist_getcanvas(owner), owner, state);
//sys_vgui("pdtk_select_all_gop_widgets .x%lx %lx %d\n", glist_getcanvas(owner), owner, state);
scalar_drawselectrect(x, owner, state);
}
......
......@@ -5460,12 +5460,12 @@ proc pdtk_data_dialog {name stuff} {
match_linux_wm [list frame $name.buttonframe]
pack $name.buttonframe -side bottom -fill x -pady 3
match_linux_wm [list button $name.buttonframe.send -text {Send (Ctrl s)}\
match_linux_wm [list button $name.buttonframe.send -text {Send (Ctrl+s)}\
-command [concat dodata_send $name]]
match_linux_wm [list button $name.buttonframe.ok -text {OK (Ctrl t)}\
match_linux_wm [list button $name.buttonframe.ok -text {OK (Ctrl+t)}\
-command [concat dodata_ok $name]]
pack $name.buttonframe.ok -side right -expand 0 -pady 3
pack $name.buttonframe.send -side right -expand 0 -pady 3
pack $name.buttonframe.ok -side right -expand 0 -pady 3 -padx 3
pack $name.buttonframe.send -side right -expand 0 -pady 3 -padx 3
match_linux_wm [list text $name.text -relief sunken -bd 1 -height 40 -width 60 \
-yscrollcommand "$name.scroll set" -font $pd_deffont \
......
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