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.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/grc/core/generator/top_block.py b/grc/core/generator/top_block.py
index 6653bc7ae0..02f6990a94 100644
--- a/grc/core/generator/top_block.py
+++ b/grc/core/generator/top_block.py
@@ -196,6 +196,18 @@ class TopBlockGenerator(object):
]
blocks = expr_utils.sort_objects(blocks, operator.attrgetter('name'), _get_block_sort_text)
+
+ # 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
+
+ blocks = sorted(blocks, key=lambda block: block.without_gui_hint)
+
blocks_make = []
for block in blocks:
make = block.templates.render('make')