diff options
author | Sebastian Koslowski <koslowski@kit.edu> | 2015-03-24 15:50:45 +0100 |
---|---|---|
committer | Sebastian Koslowski <koslowski@kit.edu> | 2015-04-03 22:17:59 +0200 |
commit | 3271e9f31c11a4fc36a3989e236f2dc919bda86b (patch) | |
tree | bc490c280ae5c31fb1325332bd53b6e16d239f20 /grc/gui/FlowGraph.py | |
parent | 6afc40e80f05a6cc2dbdebcc037ed40c5f5921f1 (diff) |
grc: add block comments
Diffstat (limited to 'grc/gui/FlowGraph.py')
-rw-r--r-- | grc/gui/FlowGraph.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/grc/gui/FlowGraph.py b/grc/gui/FlowGraph.py index f8be2f6cc3..d512a6793d 100644 --- a/grc/gui/FlowGraph.py +++ b/grc/gui/FlowGraph.py @@ -280,6 +280,12 @@ 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 + hide_disabled_blocks = Actions.TOGGLE_HIDE_DISABLED_BLOCKS.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) #draw multi select rectangle if self.mouse_pressed and (not self.get_selected_elements() or self.get_ctrl_mask()): #coordinates @@ -295,7 +301,7 @@ class FlowGraph(Element): window.draw_rectangle(gc, False, x, y, w, h) #draw blocks on top of connections 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 |