Changeset - 5054d49ed44e
[Not reviewed]
default
0 1 0
drewp@bigasterisk.com - 12 years ago 2013-06-10 19:57:15
drewp@bigasterisk.com
rework some CC currentGraph optimizations
Ignore-this: f01851abc4f649b169a1753670a5fbe
1 file changed with 8 insertions and 10 deletions:
0 comments (0 inline, 0 general)
bin/curvecalc
Show inline comments
 
@@ -173,21 +173,19 @@ class Main(object):
 
            self.makeSubterm(newname, withCurve=wc)
 
        dialog.hide()
 

	
 
    def currentSong(self, current=None):
 
        def fin(current):
 
    def currentSong(self):
 

	
 
        with self.graph.currentState(
 
                tripleFilter=(self.session, L9['currentSong'], None)
 
        ) as current:
 
            return current.value(self.session, L9['currentSong'])
 
        if current is None:
 
            with self.graph.currentState() as current:
 
                return fin(current)
 
        else:
 
            return fin(current)
 

	
 
    def songSubtermsContext(self, current=None):
 
        return self.currentSong(current=current)
 
    def songSubtermsContext(self):
 
        return self.currentSong()
 

	
 
    def makeSubterm(self, newname, withCurve=False, expr=None, sub=None):
 
        with self.graph.currentState() as current:
 
            song = self.currentSong(current=current)
 
            song = self.currentSong()
 
            for i in range(1000):
 
                uri = song + "/subterm/%d" % i
 
                if (uri, None, None) not in current:
0 comments (0 inline, 0 general)