diff options
author | Sebastian Koslowski <koslowski@kit.edu> | 2015-08-19 14:37:55 +0200 |
---|---|---|
committer | Sebastian Koslowski <koslowski@kit.edu> | 2015-09-02 11:48:33 +0200 |
commit | 791c1a705d9e1457d9c09c79c7f1300c2ac63f5e (patch) | |
tree | 90fd62889640cde760c16e9945b81a483af4e83f /grc/gui/FlowGraph.py | |
parent | c3ed72b9d9fffb234ed266c243a6b3c3b49d42d2 (diff) |
grc: sort blocks in export_data(), draw disabled blocks first (fixes #830)
Diffstat (limited to 'grc/gui/FlowGraph.py')
-rw-r--r-- | grc/gui/FlowGraph.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/grc/gui/FlowGraph.py b/grc/gui/FlowGraph.py index 4a9fb0b9d8..b1e88aae8e 100644 --- a/grc/gui/FlowGraph.py +++ b/grc/gui/FlowGraph.py @@ -309,7 +309,8 @@ class FlowGraph(Element): 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() - for element in chain(self.iter_connections(), self.iter_blocks()): + blocks = sorted(self.iter_blocks(), key=methodcaller('get_enabled')) + for element in chain(self.iter_connections(), blocks): if hide_disabled_blocks and not element.get_enabled(): continue # skip hidden disabled blocks and connections element.draw(gc, window) |