# HG changeset patch # User Drew Perttula # Date 1401347551 0 # Node ID edf46615712a8c86a79bac148da6f4e414d53416 # Parent 2930523b8bfe2110e671cb959c140d8b55f1f661 don't write extra precision in curve data. keep curvecalc rows sorted Ignore-this: 71794339abfd347ccd3c0d99be635457 diff -r 2930523b8bfe -r edf46615712a light9/curvecalc/curve.py --- a/light9/curvecalc/curve.py Thu May 29 06:59:44 2014 +0000 +++ b/light9/curvecalc/curve.py Thu May 29 07:12:31 2014 +0000 @@ -56,7 +56,12 @@ dispatcher.send("points changed",sender=self) def points_as_string(self): - return ' '.join("%s %r" % p for p in self.points) + def outVal(x): + if isinstance(x, basestring): # markers + return x + return "%.4g" % x + return ' '.join("%s %s" % (outVal(p[0]), outVal(p[1])) + for p in self.points) def save(self,filename): # this is just around for markers, now @@ -204,7 +209,7 @@ if self.currentSong is None: return - for uri in self.graph.objects(self.currentSong, L9['curve']): + for uri in sorted(self.graph.objects(self.currentSong, L9['curve'])): pts = self.graph.value(uri, L9['points']) c = Curve(uri, pointsStorage='file' if pts is None else 'graph') if pts is not None: