Commit 32e1df40 authored by Ivica Bukvic's avatar Ivica Bukvic
Browse files

*reversed "fix" to a regression made in a previous commit (see commit...

*reversed "fix" to a regression made in a previous commit (see commit 28b0256f) and removed the old commit that caused the regression in the first place.
parent f2f04d80
...@@ -47,7 +47,7 @@ struct _rtext ...@@ -47,7 +47,7 @@ struct _rtext
int x_drawnheight; int x_drawnheight;
t_text *x_text; t_text *x_text;
t_glist *x_glist; t_glist *x_glist;
char x_tag[20]; char x_tag[50];
struct _rtext *x_next; struct _rtext *x_next;
}; };
...@@ -61,7 +61,8 @@ t_rtext *rtext_new(t_glist *glist, t_text *who) ...@@ -61,7 +61,8 @@ t_rtext *rtext_new(t_glist *glist, t_text *who)
x->x_drawnwidth = x->x_drawnheight = 0; x->x_drawnwidth = x->x_drawnheight = 0;
binbuf_gettext(who->te_binbuf, &x->x_buf, &x->x_bufsize); binbuf_gettext(who->te_binbuf, &x->x_buf, &x->x_bufsize);
glist->gl_editor->e_rtext = x; 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); return (x);
} }
......
...@@ -473,29 +473,14 @@ void scalar_select(t_gobj *z, t_glist *owner, int state) ...@@ -473,29 +473,14 @@ void scalar_select(t_gobj *z, t_glist *owner, int state)
glist_getcanvas(owner), x); glist_getcanvas(owner), x);
sys_vgui(".x%lx.c addtag scalar_selected withtag {.scalar%lx}\n", sys_vgui(".x%lx.c addtag scalar_selected withtag {.scalar%lx}\n",
glist_getcanvas(owner), x->sc_vec); 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 else
{ {
x->sc_selected = 0;
sys_vgui(".x%lx.c dtag blankscalar%lx selected\n", sys_vgui(".x%lx.c dtag blankscalar%lx selected\n",
glist_getcanvas(owner), x); glist_getcanvas(owner), x);
sys_vgui(".x%lx.c dtag .scalar%lx scalar_selected\n", sys_vgui(".x%lx.c dtag .scalar%lx scalar_selected\n",
glist_getcanvas(owner), x->sc_vec); 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", //sys_vgui("pdtk_select_all_gop_widgets .x%lx %lx %d\n",
// glist_getcanvas(owner), owner, state); // glist_getcanvas(owner), owner, state);
......
...@@ -4203,7 +4203,7 @@ proc pdtk_canvas_mouseup {name x y b} { ...@@ -4203,7 +4203,7 @@ proc pdtk_canvas_mouseup {name x y b} {
proc pdtk_select_all_gop_widgets {name gop state} { proc pdtk_select_all_gop_widgets {name gop state} {
#puts stderr "pdtk_select_all_gop_widgets $name $gop $state" #puts stderr "pdtk_select_all_gop_widgets $name $gop $state"
foreach item [$name.c find all] { 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] { foreach tag [$name.c gettags $item] {
if { [string first $gop $tag] > -1 } { if { [string first $gop $tag] > -1 } {
#puts stderr "...match $tag" #puts stderr "...match $tag"
...@@ -8159,7 +8159,7 @@ proc pdtk_canvas_update_sticky_tip {w} { ...@@ -8159,7 +8159,7 @@ proc pdtk_canvas_update_sticky_tip {w} {
proc pdtk_canvas_displace_withtag {w dx dy} { proc pdtk_canvas_displace_withtag {w dx dy} {
#puts stderr "pdtk_canvas_displace_withtag $dx $dy" #puts stderr "pdtk_canvas_displace_withtag $dx $dy"
$w move selected $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] set matrix [lindex [$w itemconfigure $item -matrix] 4]
#puts stderr "A:$matrix" #puts stderr "A:$matrix"
set newx [expr {[lindex $matrix 2 0] + $dx}] set newx [expr {[lindex $matrix 2 0] + $dx}]
...@@ -8168,15 +8168,6 @@ proc pdtk_canvas_displace_withtag {w dx dy} { ...@@ -8168,15 +8168,6 @@ proc pdtk_canvas_displace_withtag {w dx dy} {
#puts stderr "B:$matrix" #puts stderr "B:$matrix"
$w itemconfigure $item -matrix $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? # move activewidth to toggle on editmode?
......
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