From 32e1df40b0bd0895b21fddd2b7bb037220f39ed3 Mon Sep 17 00:00:00 2001 From: Ivica Ico Bukvic <ico@vt.edu> Date: Sun, 31 Aug 2014 16:17:05 -0400 Subject: [PATCH] *reversed "fix" to a regression made in a previous commit (see commit 28b0256f12bd1652ad0dfc743c08208746c6e829) and removed the old commit that caused the regression in the first place. --- pd/src/g_rtext.c | 5 +++-- pd/src/g_scalar.c | 17 +---------------- pd/src/pd.tk | 13 ++----------- 3 files changed, 6 insertions(+), 29 deletions(-) diff --git a/pd/src/g_rtext.c b/pd/src/g_rtext.c index 4bcb119e2..e4ad0c5cc 100644 --- a/pd/src/g_rtext.c +++ b/pd/src/g_rtext.c @@ -47,7 +47,7 @@ struct _rtext int x_drawnheight; t_text *x_text; t_glist *x_glist; - char x_tag[20]; + char x_tag[50]; struct _rtext *x_next; }; @@ -61,7 +61,8 @@ t_rtext *rtext_new(t_glist *glist, t_text *who) x->x_drawnwidth = x->x_drawnheight = 0; binbuf_gettext(who->te_binbuf, &x->x_buf, &x->x_bufsize); glist->gl_editor->e_rtext = x; - sprintf(x->x_tag, "x%lx", (long)who); + sprintf(x->x_tag, ".x%lx.t%lx", (t_int)glist_getcanvas(x->x_glist), + (t_int)x); return (x); } diff --git a/pd/src/g_scalar.c b/pd/src/g_scalar.c index e650e03e1..ab8315f15 100644 --- a/pd/src/g_scalar.c +++ b/pd/src/g_scalar.c @@ -473,29 +473,14 @@ void scalar_select(t_gobj *z, t_glist *owner, int state) glist_getcanvas(owner), x); sys_vgui(".x%lx.c addtag scalar_selected withtag {.scalar%lx}\n", glist_getcanvas(owner), x->sc_vec); - if (x->sc_selected != glist_getcanvas(owner)) - { - // we are inside gop - sys_vgui(".x%lx.c addtag scalarGOP withtag blankscalar%lx\n", - glist_getcanvas(owner), x); - sys_vgui(".x%lx.c addtag scalarGOP withtag {.scalar%lx}\n", - glist_getcanvas(owner), x->sc_vec); - } } else { + x->sc_selected = 0; sys_vgui(".x%lx.c dtag blankscalar%lx selected\n", glist_getcanvas(owner), x); sys_vgui(".x%lx.c dtag .scalar%lx scalar_selected\n", glist_getcanvas(owner), x->sc_vec); - if (x->sc_selected != glist_getcanvas(owner)) - { - sys_vgui(".x%lx.c dtag blankscalar%lx scalarGOP\n", - glist_getcanvas(owner), x); - sys_vgui(".x%lx.c dtag .scalar%lx scalarGOP\n", - glist_getcanvas(owner), x->sc_vec); - } - x->sc_selected = 0; } //sys_vgui("pdtk_select_all_gop_widgets .x%lx %lx %d\n", // glist_getcanvas(owner), owner, state); diff --git a/pd/src/pd.tk b/pd/src/pd.tk index 5944eaeec..a71b5b16f 100644 --- a/pd/src/pd.tk +++ b/pd/src/pd.tk @@ -4203,7 +4203,7 @@ proc pdtk_canvas_mouseup {name x y b} { proc pdtk_select_all_gop_widgets {name gop state} { #puts stderr "pdtk_select_all_gop_widgets $name $gop $state" foreach item [$name.c find all] { - #puts stderr [$name.c gettags $item] + #puts stderr "object tags [$name.c gettags $item]" foreach tag [$name.c gettags $item] { if { [string first $gop $tag] > -1 } { #puts stderr "...match $tag" @@ -8159,7 +8159,7 @@ proc pdtk_canvas_update_sticky_tip {w} { proc pdtk_canvas_displace_withtag {w dx dy} { #puts stderr "pdtk_canvas_displace_withtag $dx $dy" $w move selected $dx $dy - foreach item [$w find withtag {scalar_selected&&!scalarGOP}] { + foreach item [$w find withtag scalar_selected] { set matrix [lindex [$w itemconfigure $item -matrix] 4] #puts stderr "A:$matrix" set newx [expr {[lindex $matrix 2 0] + $dx}] @@ -8168,15 +8168,6 @@ proc pdtk_canvas_displace_withtag {w dx dy} { #puts stderr "B:$matrix" $w itemconfigure $item -matrix $matrix } - foreach item [$w find withtag {scalar_selected&&scalarGOP}] { - set matrix [lindex [$w itemconfigure $item -matrix] 4] - #puts stderr "C:$matrix" - set newx [expr {[lindex $matrix 2 0] + ($dx * [expr 1.0-[lindex $matrix 0 0]])}] - set newy [expr {[lindex $matrix 2 1] + ($dy * [expr 1.0-[lindex $matrix 1 1]])}] - set matrix [lreplace $matrix 2 2 [list $newx $newy]] - #puts stderr "D:$matrix" - $w itemconfigure $item -matrix $matrix - } } # move activewidth to toggle on editmode? -- GitLab