commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 03/14: grc: hide comments of hidden variabl


From: git
Subject: [Commit-gnuradio] [gnuradio] 03/14: grc: hide comments of hidden variables
Date: Mon, 30 May 2016 21:23:22 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

jcorgan pushed a commit to branch master
in repository gnuradio.

commit 4753c2173ea43ce27d7e76eccff08c412b869c61
Author: Sebastian Koslowski <address@hidden>
Date:   Fri May 27 23:08:26 2016 +0200

    grc: hide comments of hidden variables
---
 grc/gui/FlowGraph.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/grc/gui/FlowGraph.py b/grc/gui/FlowGraph.py
index 02d5197..6eb05f9 100644
--- a/grc/gui/FlowGraph.py
+++ b/grc/gui/FlowGraph.py
@@ -405,6 +405,9 @@ class FlowGraph(Element, _Flowgraph):
         """
 
         W,H = self.get_size()
+        hide_disabled_blocks = Actions.TOGGLE_HIDE_DISABLED_BLOCKS.get_active()
+        hide_variables = Actions.TOGGLE_HIDE_VARIABLES.get_active()
+
         #draw the background
         gc.set_foreground(Colors.FLOWGRAPH_BACKGROUND_COLOR)
         window.draw_rectangle(gc, True, 0, 0, W, H)
@@ -412,6 +415,8 @@ class FlowGraph(Element, _Flowgraph):
         # draw comments first
         if Actions.TOGGLE_SHOW_BLOCK_COMMENTS.get_active():
             for block in self.blocks:
+                if hide_variables and (block.is_variable or block.is_import):
+                    continue  # skip hidden disabled blocks and connections
                 if block.get_enabled():
                     block.draw_comment(gc, window)
         #draw multi select rectangle
@@ -428,10 +433,7 @@ class FlowGraph(Element, _Flowgraph):
             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()
-        hide_variables = Actions.TOGGLE_HIDE_VARIABLES.get_active()
         blocks = sorted(self.blocks, key=methodcaller('get_enabled'))
-
         for element in chain(self.connections, blocks):
             if hide_disabled_blocks and not element.get_enabled():
                 continue  # skip hidden disabled blocks and connections



reply via email to

[Prev in Thread] Current Thread [Next in Thread]