changeset 751:5656767ca025

first drop action of a sub successfully gets current music time Ignore-this: 1e0b9a46c771e5e51c182c2a45e259cc
author drewp@bigasterisk.com
date Fri, 15 Jun 2012 20:49:57 +0000
parents 517d96e9f122
children 20d6884478bc
files bin/curvecalc
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/bin/curvecalc	Fri Jun 15 20:49:52 2012 +0000
+++ b/bin/curvecalc	Fri Jun 15 20:49:57 2012 +0000
@@ -48,6 +48,7 @@
     def __init__(self, graph, opts, song, curveset, subterms, music):
         self.graph, self.opts, self.song = graph, opts, song
         self.curveset, self.subterms, self.music = curveset, subterms, music
+        self.lastSeenInputTime = 0
 
         wtree = self.wtree = gtk.Builder()
         wtree.add_from_file("light9/curvecalc/curvecalc.glade")
@@ -96,7 +97,7 @@
         except SubtermExists:
             pass
         curveView = self.curvesetView.row(subName).curveView
-        t = curveView.current_time()
+        t = self.lastSeenInputTime # curveView.current_time() # new curve hasn't heard the time yet
         print "time", t
         curveView.add_point((t - .5, 0))
         curveView.add_point((t, 1))
@@ -218,6 +219,8 @@
             dispatcher.connect(lambda val, value=value, tf=textfilter:
                                value.set_text(tf(val)),
                                signame, weak=False)
+        dispatcher.connect(lambda val: setattr(self, 'lastSeenInputTime', val),
+                           'input time', weak=False)
         master.show_all()
 
     def refreshCurveView(self):