From 7f93764ed17c4ad741c41d62e3acdbfd1a485d10 Mon Sep 17 00:00:00 2001 From: Seth Hitefield <sdh11@vt.edu> Date: Fri, 22 Aug 2014 16:33:52 -0400 Subject: grc: Reloading blocks forces reload for all open flow graphs. --- grc/gui/FlowGraph.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'grc/gui/FlowGraph.py') 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 ########################################################################## -- cgit v1.2.3