summaryrefslogtreecommitdiff
path: root/grc/core/FlowGraph.py
diff options
context:
space:
mode:
authorVolker Schroer <3470424+dl1ksv@users.noreply.github.com>2021-07-09 12:11:24 +0200
committermormj <34754695+mormj@users.noreply.github.com>2021-07-19 06:34:39 -0400
commitfbab6c383d6f86ab0de42a90a9182d22637a5b96 (patch)
tree9483ed509e866352f525cb9385fa7032ee260d51 /grc/core/FlowGraph.py
parentfbf2082c0e110eed210e05894c356f3582397993 (diff)
grc: update disabled blocks if they depend on others
If we want disabled blocks to be updated properly, we have to consider all blocks when updating the fg not only the enabled. This does the patch of Flowgraph.py and fixes #4788. But a problem remains. If you use the example in #4788 and disable the symbol_rate block, only the samp_rate block 'turns to red'. The other blocks don't change. Only if you open and close an arbitrary block, the other blocks are updated. This is fixed by clearing the namespace in renew_namespace in FlowGraph.py. Signed-off-by: Volker Schroer <3470424+dl1ksv@users.noreply.github.com> grc: update disabled blocks Signed-off-by: Volker Schroer <3470424+dl1ksv@users.noreply.github.com>
Diffstat (limited to 'grc/core/FlowGraph.py')
-rw-r--r--grc/core/FlowGraph.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/grc/core/FlowGraph.py b/grc/core/FlowGraph.py
index 84ca180861..5ef776d6b2 100644
--- a/grc/core/FlowGraph.py
+++ b/grc/core/FlowGraph.py
@@ -216,7 +216,7 @@ class FlowGraph(Element):
return elements
def children(self):
- return itertools.chain(self.iter_enabled_blocks(), self.connections)
+ return itertools.chain(self.blocks, self.connections)
def rewrite(self):
"""
@@ -227,6 +227,7 @@ class FlowGraph(Element):
def renew_namespace(self):
namespace = {}
+ self.namespace.clear()
# Load imports
for expr in self.imports():
try: