diff options
author | Christophe Seguinot <christophe.seguinot@univ-lille.fr> | 2021-02-21 18:52:36 +0100 |
---|---|---|
committer | mormj <34754695+mormj@users.noreply.github.com> | 2021-03-10 09:11:19 -0500 |
commit | a53bb7a76047414eeae611f9d1fdcca4c6e2fa53 (patch) | |
tree | e72cd1e964b2e80889210fcbe13297bbf1bf1838 | |
parent | 9a25928a621081fae49b81ed4b2eb221cded9d1b (diff) |
grc: validate gui hints
Signed-off-by: Christophe Seguinot <christophe.seguinot@univ-lille.fr>
-rw-r--r-- | grc/core/generator/top_block.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/grc/core/generator/top_block.py b/grc/core/generator/top_block.py index 02f6990a94..091922d963 100644 --- a/grc/core/generator/top_block.py +++ b/grc/core/generator/top_block.py @@ -199,12 +199,8 @@ class TopBlockGenerator(object): # Ordering blocks : blocks with GUI Hint must be processed first to avoid PyQT5 superposing blocks for block in blocks: - try: - block.without_gui_hint = (block.params['gui_hint'].get_value()=='') - except KeyError: - # No gui hint - block.without_gui_hint = True - pass + hint = block.params.get('gui_hint') + block.without_gui_hint = not hint # (hint == None) or (not hint.get_value()) blocks = sorted(blocks, key=lambda block: block.without_gui_hint) |