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): ...@@ -301,7 +301,7 @@ class Signalroute(Connection):
self.label_out.document().contentsChanged.connect(self.change_siglist) self.label_out.document().contentsChanged.connect(self.change_siglist)
for each in (self.label_in, self.label_out): for each in (self.label_in, self.label_out):
each.show() each.show()
self.reshape() #self.reshape()
@Slot() @Slot()
def change_siglist(self): def change_siglist(self):
...@@ -414,13 +414,12 @@ class Channel(Signalroute): ...@@ -414,13 +414,12 @@ class Channel(Signalroute):
@property @property
def start_point(self): def start_point(self):
''' Compute connection origin - redefined function ''' ''' Compute connection origin - redefined function '''
return self.parent.mapFromScene(self._start_point) return self._start_point
@start_point.setter @start_point.setter
def start_point(self, scene_coord): # type: QPointF def start_point(self, scene_coord): # type: QPointF
''' value is in scene coordinates ''' ''' value is in scene coordinates '''
print 'set start point' self._start_point = self.parent.mapFromScene(scene_coord)
self._start_point = scene_coord
@property @property
def end_point(self): def end_point(self):
......
...@@ -411,10 +411,10 @@ def _channel(symbol, recursive=True, **kwargs): ...@@ -411,10 +411,10 @@ def _channel(symbol, recursive=True, **kwargs):
result.append('SIGNALROUTE c') result.append('SIGNALROUTE c')
Indent.indent += 1 Indent.indent += 1
if symbol.out_sig: 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)) symbol.out_sig))
if symbol.in_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)) symbol.in_sig))
Indent.indent -= 1 Indent.indent -= 1
return result 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