Draw active arm spline on top
This makes it much easier to see the current spline if it is in a large
nest of splines.
Change-Id: I51205d2a8469f4923abbfd281fca512969da8553
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/y2023/control_loops/python/graph_edit.py b/y2023/control_loops/python/graph_edit.py
index a976807..3018be8 100644
--- a/y2023/control_loops/python/graph_edit.py
+++ b/y2023/control_loops/python/graph_edit.py
@@ -376,16 +376,21 @@
for i in range(len(self.segments)):
color = None
if i == self.index:
- # Draw current spline in black
- color = [0, 0, 0]
- else:
- color = [0, random.random(), 1]
- random.shuffle(color)
+ continue
+ color = [0, random.random(), 1]
+ random.shuffle(color)
set_color(cr, Color(color[0], color[1], color[2]))
self.segments[i].DrawTo(cr, self.theta_version)
with px(cr):
cr.stroke()
+ # Draw current spline in black
+ color = [0, 0, 0]
+ set_color(cr, Color(color[0], color[1], color[2]))
+ self.segments[self.index].DrawTo(cr, self.theta_version)
+ with px(cr):
+ cr.stroke()
+
set_color(cr, Color(0.0, 1.0, 0.5))
# Create the plots