ref: 06689e3784487e3c450521881b39d3cf40278f37
parent: 70b5711e8aca15868a92b193111365f81b1f6fab
author: qwx <qwx@sciops.net>
date: Thu Apr 15 17:31:11 EDT 2021
vspr: fix selection square location and redraw on rotate
--- a/utils/vspr.c
+++ b/utils/vspr.c
@@ -64,7 +64,7 @@
p = addpt(ui->r.min, o);
line(canvas, p, Pt(p.x+Nodesz, p.y), 0, 0, 0, selcol, ZP);
line(canvas, p, Pt(p.x, p.y+Nodesz), 0, 0, 0, selcol, ZP);
- line(canvas, Pt(p.x, p.y+Nodesz), Pt(p.x+Nodesz, p.y+Nodesz), 0, 0, 0, selcol, ZP);
+ line(canvas, Pt(p.x, p.y+Nodesz), Pt(p.x+Nodesz+1, p.y+Nodesz), 0, 0, 0, selcol, ZP);
line(canvas, Pt(p.x+Nodesz, p.y), Pt(p.x+Nodesz, p.y+Nodesz), 0, 0, 0, selcol, ZP);
if(us != nil)
snprint(s, sizeof s, "%s frm %02d size %R sha %R", name, frm, r, us->r);
@@ -240,8 +240,8 @@
case ' ': setpause(); break;
case Kup: shadofs.y -= 1; redraw(); break;
case Kdown: shadofs.y += 1; redraw(); break;
- case Kright: rot = (rot + 1) % nrot; break;
- case Kleft: if(--rot < 0) rot = nrot - 1; break;
+ case Kright: rot = (rot + 1) % nrot; redraw(); break;
+ case Kleft: if(--rot < 0) rot = nrot - 1; redraw(); break;
case Kdel: case 'q': threadexitsall(nil);
}
break;