Changeset - d588211a0b4e
[Not reviewed]
default
0 1 0
Drew Perttula - 11 years ago 2014-06-09 03:56:44
drewp@bigasterisk.com
1 file changed with 2 insertions and 0 deletions:
0 comments (0 inline, 0 general)
light9/curvecalc/curve.py
Show inline comments
 
@@ -104,24 +104,26 @@ class Curve(object):
 
        x, y = new_pt
 
        exist = self.points_between(x, x + clear_ahead_secs)
 
        for pt in exist:
 
            self.remove_point(pt)
 
        self.insert_pt(new_pt)
 
        dispatcher.send("points changed", sender=self)
 
        # now simplify to the left
 
        
 
    def set_points(self, updates):
 
        for i, pt in updates:
 
            self.points[i] = pt
 

	
 
        # this should be on, but live_input_point made it fail a
 
        # lot. need a new solution.
 
        #self.checkOverlap()
 
        dispatcher.send("points changed", sender=self)
 
            
 
    def checkOverlap(self):
 
        x = None
 
        for p in self.points:
 
            if p[0] <= x:
 
                raise ValueError("overlapping points")
 
            x = p[0]
 

	
 
    def pop_point(self, i):
 
        p = self.points.pop(i)
0 comments (0 inline, 0 general)