summaryrefslogtreecommitdiff
path: root/grc/gui/FlowGraph.py
diff options
context:
space:
mode:
authorJohnathan Corgan <johnathan@corganlabs.com>2015-04-04 10:39:03 -0700
committerJohnathan Corgan <johnathan@corganlabs.com>2015-04-04 10:39:03 -0700
commitfa2abde0a0c9c1430ca1c4bb470ddb35e18c0ee2 (patch)
tree5c857f2385f795f267adcf26284f56aab3423b7a /grc/gui/FlowGraph.py
parente16f9489d71720e8a9d9ec37ced0c033a99c87aa (diff)
parentad0eb4512d6cc4a5f35c8ac9117aa6ee71fee1cf (diff)
Merge remote-tracking branch 'skoslowski/block_comments'
Diffstat (limited to 'grc/gui/FlowGraph.py')
-rw-r--r--grc/gui/FlowGraph.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/grc/gui/FlowGraph.py b/grc/gui/FlowGraph.py
index f8be2f6cc3..97f814f1bf 100644
--- a/grc/gui/FlowGraph.py
+++ b/grc/gui/FlowGraph.py
@@ -280,6 +280,11 @@ class FlowGraph(Element):
#draw the background
gc.set_foreground(Colors.FLOWGRAPH_BACKGROUND_COLOR)
window.draw_rectangle(gc, True, 0, 0, W, H)
+ # draw comments first
+ if Actions.TOGGLE_SHOW_BLOCK_COMMENTS.get_active():
+ for block in self.get_blocks():
+ 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
@@ -294,8 +299,9 @@ 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 Actions.TOGGLE_HIDE_DISABLED_BLOCKS.get_active() and not element.get_enabled():
+ if hide_disabled_blocks and not element.get_enabled():
continue # skip hidden disabled blocks and connections
element.draw(gc, window)
#draw selected blocks on top of selected connections