summaryrefslogtreecommitdiff
path: root/grc/gui
diff options
context:
space:
mode:
authorHåkon Vågsether <hauk142@gmail.com>2021-01-13 14:27:28 +0100
committermormj <34754695+mormj@users.noreply.github.com>2021-01-13 11:45:05 -0500
commitd073ed6b5b0fa559db80dd084d2e5f4a33836e65 (patch)
tree08b8a96b5097acce83030159092c234aa0e97040 /grc/gui
parentbe21c29995a7cfdee731cc4cf1daa715d0caac11 (diff)
grc: Don't draw disabled and hidden blocks, even if they are selected
Signed-off-by: Håkon Vågsether <hauk142@gmail.com>
Diffstat (limited to 'grc/gui')
-rw-r--r--grc/gui/canvas/flowgraph.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/grc/gui/canvas/flowgraph.py b/grc/gui/canvas/flowgraph.py
index 03cfc9cdf8..192fd3c1cb 100644
--- a/grc/gui/canvas/flowgraph.py
+++ b/grc/gui/canvas/flowgraph.py
@@ -493,6 +493,7 @@ class FlowGraph(CoreFlowgraph, Drawable):
def _drawables(self):
# todo: cache that
show_comments = Actions.TOGGLE_SHOW_BLOCK_COMMENTS.get_active()
+ hide_disabled_blocks = Actions.TOGGLE_HIDE_DISABLED_BLOCKS.get_active()
for element in self._elements_to_draw:
if element.is_block and show_comments and element.enabled:
yield element.draw_comment
@@ -502,7 +503,8 @@ class FlowGraph(CoreFlowgraph, Drawable):
if element not in self.selected_elements:
yield element.draw
for element in self.selected_elements:
- yield element.draw
+ if element.enabled or not hide_disabled_blocks:
+ yield element.draw
def draw(self, cr):
"""Draw blocks connections comment and select rectangle"""