From c7885bc0d61a53397bc417260ef59d95ca5cbd32 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Sat, 23 Apr 2011 21:52:29 -0400 Subject: [PATCH] individual constraint drawing routines responsible for setting color --- SketchWidget.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SketchWidget.py b/SketchWidget.py index 07f1902..082511e 100644 --- a/SketchWidget.py +++ b/SketchWidget.py @@ -287,7 +287,6 @@ class SketchWidget: self.drawCircle(shape) def drawConstraints(self): - glColor(*self.constraint_color) for c in self.sketch.constraints: if isinstance(c, Connect): self.drawConnect(c) @@ -297,10 +296,12 @@ class SketchWidget: self.drawVertical(c) def drawConnect(self, con): + glColor(*self.constraint_color) pt = self.ptToScreenPt(con.shape1.getPt(con.pt1)) self.drawHandle(pt[0], pt[1]) def drawHandle(self, x, y): + glColor(*self.constraint_color) self.drawFilledCircle(x, y, self.line_width, 4) s = self.line_width * 2 glBegin(GL_LINE_LOOP) @@ -311,6 +312,7 @@ class SketchWidget: glEnd() def drawHorizontal(self, con): + glColor(*self.constraint_color) l = 15.0 glPushAttrib(GL_LINE_BIT) glEnable(GL_LINE_STIPPLE) @@ -326,6 +328,7 @@ class SketchWidget: glPopAttrib() def drawVertical(self, con): + glColor(*self.constraint_color) l = 15.0 glPushAttrib(GL_LINE_BIT) glEnable(GL_LINE_STIPPLE)