summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Pi <david.pinho@gmail.com>2020-11-12 16:11:51 +0000
committermormj <34754695+mormj@users.noreply.github.com>2020-12-17 08:31:55 -0500
commit176e86980b3eeb9795c7a217fba9eb205c7a5adf (patch)
tree0de25a9b5ed35bdc443a5a859e300adc5e02c131
parenta9263b4a6a10aa66522a32d8a0deebb2ce205c88 (diff)
grc: Fix message port show/hide problem due to bus logic update
update_bus_logic() is called when disabling a bus, it doesn't check if it's been previously enabled. This causes it to restore port.hidden with a None which ultimately is converted to False. So it never hides the message ports. Also, filter message ports from buses.
-rw-r--r--grc/core/blocks/block.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/grc/core/blocks/block.py b/grc/core/blocks/block.py
index 58bb9606cd..418c8b1c1a 100644
--- a/grc/core/blocks/block.py
+++ b/grc/core/blocks/block.py
@@ -203,8 +203,9 @@ class Block(Element):
# Re-enable the hidden property of the ports
for port in ports:
- port.hidden = port.stored_hidden_state
- port.stored_hidden_state = None
+ if (port.stored_hidden_state is not None):
+ port.hidden = port.stored_hidden_state
+ port.stored_hidden_state = None
@@ -705,6 +706,8 @@ class Block(Element):
cnt = 0
idx = 0
for p in ports:
+ if p.domain == 'message':
+ continue
if cnt > 0:
cnt -= 1
continue