summaryrefslogtreecommitdiff
path: root/grc/core
diff options
context:
space:
mode:
authorSebastian Koslowski <koslowski@kit.edu>2016-07-29 15:42:31 +0200
committerSebastian Koslowski <koslowski@kit.edu>2016-07-29 15:45:08 +0200
commit0417d966ab328b51c0cdfeb5d8920cbbcd69c9de (patch)
tree0777b21b5e5e8bb13908e9cb7164bbadeb725540 /grc/core
parent6f067a5029baaf4be8fcb39c6b22729a0a9e946b (diff)
grc: gtk3: fix generating virtual/bypassed connections
Diffstat (limited to 'grc/core')
-rw-r--r--grc/core/generator/FlowGraphProxy.py6
-rw-r--r--grc/core/generator/Generator.py6
2 files changed, 6 insertions, 6 deletions
diff --git a/grc/core/generator/FlowGraphProxy.py b/grc/core/generator/FlowGraphProxy.py
index 678be4433e..23ccf95c4b 100644
--- a/grc/core/generator/FlowGraphProxy.py
+++ b/grc/core/generator/FlowGraphProxy.py
@@ -20,13 +20,13 @@ from __future__ import absolute_import
from six.moves import range
-class FlowGraphProxy(object):
+class FlowGraphProxy(object): # TODO: move this in a refactored Generator
def __init__(self, fg):
- self._fg = fg
+ self.orignal_flowgraph = fg
def __getattr__(self, item):
- return getattr(self._fg, item)
+ return getattr(self.orignal_flowgraph, item)
def get_hier_block_stream_io(self, direction):
"""
diff --git a/grc/core/generator/Generator.py b/grc/core/generator/Generator.py
index 7c9a1eca73..a3b0c8af43 100644
--- a/grc/core/generator/Generator.py
+++ b/grc/core/generator/Generator.py
@@ -171,11 +171,12 @@ class TopBlockGenerator(object):
connections = [con for con in fg.get_enabled_connections() if cf(con)]
# Get the virtual blocks and resolve their connections
+ connection_factory = fg.parent_platform.Connection
virtual = [c for c in connections if c.source_block.is_virtual_source()]
for connection in virtual:
source = connection.source_port.resolve_virtual_source()
sink = connection.sink_port
- resolved = fg.parent.Connection(flow_graph=fg, porta=source, portb=sink)
+ resolved = connection_factory(fg.orignal_flowgraph, source, sink)
connections.append(resolved)
# Remove the virtual connection
connections.remove(connection)
@@ -201,8 +202,7 @@ class TopBlockGenerator(object):
if not sink.enabled:
# Ignore disabled connections
continue
- sink_port = sink.sink_port
- connection = fg.parent.Connection(flow_graph=fg, porta=source_port, portb=sink_port)
+ connection = connection_factory(fg.orignal_flowgraph, source_port, sink.sink_port)
connections.append(connection)
# Remove this sink connection
connections.remove(sink)