changeset 966:16c771461cde

attempt to fix zoom corruption when CC song changes, but this didn't work Ignore-this: 819c2ecbb657cae8ca4c4bd7e32c3486
author drewp@bigasterisk.com
date Sat, 15 Jun 2013 08:51:31 +0000
parents a472171c50e4
children 2a559512752c
files bin/curvecalc light9/curvecalc/curveview.py
diffstat 2 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/bin/curvecalc	Sat Jun 15 08:46:23 2013 +0000
+++ b/bin/curvecalc	Sat Jun 15 08:51:31 2013 +0000
@@ -76,6 +76,7 @@
 
         def setSong():
             songChoice(graph.value(session, L9['currentSong']))
+            dispatcher.send("song_has_changed")
         graph.addHandler(setSong)
         # next here, watch songChoice and patch the graph
         def songToGraph(newSong):
--- a/light9/curvecalc/curveview.py	Sat Jun 15 08:46:23 2013 +0000
+++ b/light9/curvecalc/curveview.py	Sat Jun 15 08:51:31 2013 +0000
@@ -1149,6 +1149,7 @@
         dispatcher.connect(self.clear_curves, "clear_curves")
         dispatcher.connect(self.add_curve, "add_curve", sender=self.curveset)
         dispatcher.connect(self.set_featured_curves, "set_featured_curves")
+        dispatcher.connect(self.song_has_changed, "song_has_changed")
         
         self.newcurvename = gtk.EntryBuffer("", 0)
 
@@ -1163,6 +1164,9 @@
         """curveset is about to re-add all new curves"""
         while self.allCurveRows:
             self.allCurveRows.pop().destroy()
+
+    def song_has_changed(self):
+        self.zoomControl.redrawzoom()
         
     def takeFocus(self, *args):
         """the whole curveset's eventbox is what gets the focus, currently, so