summaryrefslogtreecommitdiff
path: root/grc/gui/FlowGraph.py
diff options
context:
space:
mode:
authorSebastian Koslowski <koslowski@kit.edu>2015-04-02 19:27:38 +0200
committerSebastian Koslowski <koslowski@kit.edu>2015-04-03 22:17:59 +0200
commitad0eb4512d6cc4a5f35c8ac9117aa6ee71fee1cf (patch)
tree86c5f941d5ea9e512ba2c2bb9da9c3fe195d3488 /grc/gui/FlowGraph.py
parent63e66a352e773557258fd6159363eb08c1fd1355 (diff)
grc: hide comment for disabled blocks; add colored background
Diffstat (limited to 'grc/gui/FlowGraph.py')
-rw-r--r--grc/gui/FlowGraph.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/grc/gui/FlowGraph.py b/grc/gui/FlowGraph.py
index 51b522a2d5..97f814f1bf 100644
--- a/grc/gui/FlowGraph.py
+++ b/grc/gui/FlowGraph.py
@@ -281,12 +281,10 @@ class FlowGraph(Element):
gc.set_foreground(Colors.FLOWGRAPH_BACKGROUND_COLOR)
window.draw_rectangle(gc, True, 0, 0, W, H)
# draw comments first
- hide_disabled_blocks = Actions.TOGGLE_HIDE_DISABLED_BLOCKS.get_active()
if Actions.TOGGLE_SHOW_BLOCK_COMMENTS.get_active():
for block in self.get_blocks():
- if hide_disabled_blocks and not block.get_enabled():
- continue # skip hidden disabled block comments
- block.draw_comment(gc, window)
+ if block.get_enabled():
+ block.draw_comment(gc, window)
#draw multi select rectangle
if self.mouse_pressed and (not self.get_selected_elements() or self.get_ctrl_mask()):
#coordinates
@@ -301,6 +299,7 @@ class FlowGraph(Element):
gc.set_foreground(Colors.BORDER_COLOR)
window.draw_rectangle(gc, False, x, y, w, h)
#draw blocks on top of connections
+ hide_disabled_blocks = Actions.TOGGLE_HIDE_DISABLED_BLOCKS.get_active()
for element in self.get_connections() + self.get_blocks():
if hide_disabled_blocks and not element.get_enabled():
continue # skip hidden disabled blocks and connections