diff options
-rw-r--r-- | grc/core/generator/top_block.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/grc/core/generator/top_block.py b/grc/core/generator/top_block.py index 091922d963..cd4ccc1dd5 100644 --- a/grc/core/generator/top_block.py +++ b/grc/core/generator/top_block.py @@ -198,11 +198,11 @@ 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: + def without_gui_hint(block): hint = block.params.get('gui_hint') - block.without_gui_hint = not hint # (hint == None) or (not hint.get_value()) + return hint is None or not hint.get_value() - blocks = sorted(blocks, key=lambda block: block.without_gui_hint) + blocks.sort(key=without_gui_hint) blocks_make = [] for block in blocks: |