summaryrefslogtreecommitdiff
path: root/grc/python/Block.py
diff options
context:
space:
mode:
authorJohnathan Corgan <johnathan@corganlabs.com>2015-10-28 13:04:08 -0700
committerJohnathan Corgan <johnathan@corganlabs.com>2015-10-28 13:04:08 -0700
commit1aface86b0cef695496d679cd46a9b9de46da2b4 (patch)
tree9b8141cfa3cebc378a3f713f58ed35fe4f035b1b /grc/python/Block.py
parent0e29e903324a0d84556d7500299040b09f29e500 (diff)
parentd951d1db2c47c521700844c1ff4bf9c9f6520163 (diff)
Merge branch 'maint'
Diffstat (limited to 'grc/python/Block.py')
-rw-r--r--grc/python/Block.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/grc/python/Block.py b/grc/python/Block.py
index 303aa85ed5..5289d5765e 100644
--- a/grc/python/Block.py
+++ b/grc/python/Block.py
@@ -118,11 +118,14 @@ class Block(_Block, _GUIBlock):
"""
_Block.rewrite(self)
- # adjust nports
+ # adjust nports, disconnect hidden ports
for ports in (self.get_sources(), self.get_sinks()):
for i, master_port in enumerate(ports):
nports = master_port.get_nports() or 1
num_ports = 1 + len(master_port.get_clones())
+ if master_port.get_hide():
+ for connection in master_port.get_connections():
+ self.get_parent().remove_element(connection)
if not nports and num_ports == 1: # not a master port and no left-over clones
continue
# remove excess cloned ports