Changeset - 16c771461cde
[Not reviewed]
default
0 2 0
drewp@bigasterisk.com - 12 years ago 2013-06-15 08:51:31
drewp@bigasterisk.com
attempt to fix zoom corruption when CC song changes, but this didn't work
Ignore-this: 819c2ecbb657cae8ca4c4bd7e32c3486
2 files changed with 5 insertions and 0 deletions:
0 comments (0 inline, 0 general)
bin/curvecalc
Show inline comments
 
@@ -73,12 +73,13 @@ class Main(object):
 
        mainwin.set_size_request(1678, 922)
 

	
 
        songChoice = Observable(None) # to be connected with the session song
 

	
 
        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):
 
            graph.patchObject(context=session, subject=session,
 
                              predicate=L9['currentSong'], newObject=newSong)
 
        songChoice.subscribe(songToGraph)
light9/curvecalc/curveview.py
Show inline comments
 
@@ -1146,12 +1146,13 @@ class Curvesetview(object):
 
        for c in curveset.curveNamesInOrder():
 
            self.add_curve(c) 
 

	
 
        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)
 

	
 
        eventBox = self.curvesVBox.get_parent()
 
        eventBox.connect("key-press-event", self.onKeyPress)
 
        eventBox.connect("button-press-event", self.takeFocus)
 
@@ -1160,12 +1161,15 @@ class Curvesetview(object):
 
        print "del curvesetview", id(self) 
 

	
 
    def clear_curves(self):
 
        """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
 
        keys like 'c' can work in it"""
 
        dispatcher.send("all curves lose selection")
 
        self.curvesVBox.get_parent().grab_focus()
0 comments (0 inline, 0 general)