Commit 4e10d4ea authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Attach propery channel connection to parent

parent 9a446880
......@@ -301,7 +301,7 @@ class Signalroute(Connection):
self.label_out.document().contentsChanged.connect(self.change_siglist)
for each in (self.label_in, self.label_out):
each.show()
self.reshape()
#self.reshape()
@Slot()
def change_siglist(self):
......@@ -414,13 +414,12 @@ class Channel(Signalroute):
@property
def start_point(self):
''' Compute connection origin - redefined function '''
return self.parent.mapFromScene(self._start_point)
return self._start_point
@start_point.setter
def start_point(self, scene_coord): # type: QPointF
''' value is in scene coordinates '''
print 'set start point'
self._start_point = scene_coord
self._start_point = self.parent.mapFromScene(scene_coord)
@property
def end_point(self):
......
......@@ -411,10 +411,10 @@ def _channel(symbol, recursive=True, **kwargs):
result.append('SIGNALROUTE c')
Indent.indent += 1
if symbol.out_sig:
result.append('FROM {} TO ENV WITH {};'.format(unicode(symbol.process),
result.append('FROM {} TO ENV WITH {};'.format(unicode(symbol.parent),
symbol.out_sig))
if symbol.in_sig:
result.append('FROM ENV TO {} WITH {};'.format(unicode(symbol.process),
result.append('FROM ENV TO {} WITH {};'.format(unicode(symbol.parent),
symbol.in_sig))
Indent.indent -= 1
return result
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment