[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 02/02: grc: disconnect hidden blocks
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 02/02: grc: disconnect hidden blocks |
Date: |
Wed, 28 Oct 2015 20:11:07 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch maint
in repository gnuradio.
commit d951d1db2c47c521700844c1ff4bf9c9f6520163
Author: Sebastian Koslowski <address@hidden>
Date: Wed Oct 28 20:55:43 2015 +0100
grc: disconnect hidden blocks
---
grc/python/Block.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/grc/python/Block.py b/grc/python/Block.py
index 303aa85..5289d57 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