diff options
author | Håkon Vågsether <hauk142@gmail.com> | 2021-01-13 14:27:28 +0100 |
---|---|---|
committer | mormj <34754695+mormj@users.noreply.github.com> | 2021-01-13 11:45:05 -0500 |
commit | d073ed6b5b0fa559db80dd084d2e5f4a33836e65 (patch) | |
tree | 08b8a96b5097acce83030159092c234aa0e97040 /grc/gui | |
parent | be21c29995a7cfdee731cc4cf1daa715d0caac11 (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.py | 4 |
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""" |