Mercurial > code > home > repos > light9
changeset 957:fa78048a3240
new sub zone now makes a curve/sub pair named after the sub, but doesn't make any curve pts
Ignore-this: cb012de849b4c8915f94c67a0254c987
author | drewp@bigasterisk.com |
---|---|
date | Sat, 15 Jun 2013 07:06:59 +0000 |
parents | 901884392e24 |
children | 502f0d532fd0 |
files | bin/curvecalc |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/bin/curvecalc Sat Jun 15 06:29:25 2013 +0000 +++ b/bin/curvecalc Sat Jun 15 07:06:59 2013 +0000 @@ -96,7 +96,7 @@ wtree.get_object("paned1").set_position(600) def setupNewSubZone(self): - wtree.get_object("newSubZone").drag_dest_set( + self.wtree.get_object("newSubZone").drag_dest_set( flags=gtk.DEST_DEFAULT_ALL, targets=[('text/uri-list', 0, 0)], actions=gtk.gdk.ACTION_COPY) @@ -135,7 +135,10 @@ if '?' in data: self.handleSubtermDrop(data) return - self.makeSubterm(newname="cx", withCurve=True, sub=data) + with self.graph.currentState(tripleFilter=(data, None, None)) as current: + subName = current.label(data) + self.makeSubterm(newname=subName, withCurve=True, sub=data, + expr="%s(t)" % subName) def handleSubtermDrop(self, data): params = parse_qsl(data.split('?')[1])