diff options
author | Seth Hitefield <sdh11@vt.edu> | 2014-08-22 16:33:52 -0400 |
---|---|---|
committer | Sebastian Koslowski <koslowski@kit.edu> | 2014-08-26 10:10:44 +0200 |
commit | 7f93764ed17c4ad741c41d62e3acdbfd1a485d10 (patch) | |
tree | da020915a3a3631ea2ae69256a67622c1b4ad6b4 /grc/gui/FlowGraph.py | |
parent | df693a90525ec4a49435ed4e3fb5cfec7643b61a (diff) |
grc: Reloading blocks forces reload for all open flow graphs.
Diffstat (limited to 'grc/gui/FlowGraph.py')
-rw-r--r-- | grc/gui/FlowGraph.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/grc/gui/FlowGraph.py b/grc/gui/FlowGraph.py index 31017a9923..44d46b9bc4 100644 --- a/grc/gui/FlowGraph.py +++ b/grc/gui/FlowGraph.py @@ -348,6 +348,23 @@ class FlowGraph(Element): self.create_labels() self.create_shapes() + def reload(self): + """ + Reload flow-graph (with updated blocks) + + Args: + page: the page to reload (None means current) + Returns: + False if some error occurred during import + """ + success = False + data = self.export_data() + if data: + self.unselect() + success = self.import_data(data) + self.update() + return success + ########################################################################## ## Get Selected ########################################################################## |