summaryrefslogtreecommitdiff
path: root/grc/core/generator/top_block.py
diff options
context:
space:
mode:
Diffstat (limited to 'grc/core/generator/top_block.py')
-rw-r--r--grc/core/generator/top_block.py8
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)