changeset 994:304874a34934

support dropping an effect "uri" into the curve area Ignore-this: 6c50a98847311607d7a87ede16b0543f
author drewp@bigasterisk.com
date Sun, 16 Jun 2013 18:44:45 +0000
parents 17988053ee66
children 3b059200061d
files bin/curvecalc
diffstat 1 files changed, 12 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/bin/curvecalc	Sun Jun 16 18:44:36 2013 +0000
+++ b/bin/curvecalc	Sun Jun 16 18:44:45 2013 +0000
@@ -134,14 +134,17 @@
                     tripleFilter=(subUri, RDFS.label, None)) as current:
                 subName = current.label(subUri)
 
-            try:
-                self.makeSubterm(subName, withCurve=True,
-                                 sub=subUri,
-                                 expr="%s(t)" % subName)
-            except SubtermExists:
-                # we're not making sure the expression/etc are
-                # correct-- user mihgt need to fix things
-                pass
+            if '?' in subUri:
+                subName = self.handleSubtermDrop(subUri)
+            else:
+                try:
+                    self.makeSubterm(subName, withCurve=True,
+                                     sub=subUri,
+                                     expr="%s(t)" % subName)
+                except SubtermExists:
+                    # we're not making sure the expression/etc are
+                    # correct-- user mihgt need to fix things
+                    pass
             curveView = self.curvesetView.row(subName).curveView
             t = self.lastSeenInputTime # curveView.current_time() # new curve hasn't heard the time yet. this has gotten too messy- everyone just needs to be able to reach the time source
             print "time", t
@@ -169,6 +172,7 @@
         for cmd, name in params:
             if cmd == 'curve':
                 self.curveset.new_curve(name)
+        return name
 
     def onNewCurve(self, *args):
         dialog = self.wtree.get_object("newCurve")