From 5f54b018b3a84ba4b68009a1c326ba73eaea8cfd Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sat, 5 Sep 2009 01:54:41 -0700 Subject: standardized the Element inheritance __init__ usage in gui --- grc/gui/FlowGraph.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'grc/gui/FlowGraph.py') diff --git a/grc/gui/FlowGraph.py b/grc/gui/FlowGraph.py index 5e645be72..8a908ff50 100644 --- a/grc/gui/FlowGraph.py +++ b/grc/gui/FlowGraph.py @@ -39,7 +39,7 @@ class FlowGraph(Element): and the connections between inputs and outputs. """ - def __init__(self, *args, **kwargs): + def __init__(self): """ FlowGraph contructor. Create a list for signal blocks and connections. Connect mouse handlers. -- cgit From fa465d160b0c53fae3ad7876cf429263157dd60a Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sat, 5 Sep 2009 02:21:37 -0700 Subject: Created recursive create labels and shapes method for gui element. Replaces update methods in the gui classes and simplifies calls. The master update method in flow graph calls create labels and shapes. --- grc/gui/FlowGraph.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'grc/gui/FlowGraph.py') diff --git a/grc/gui/FlowGraph.py b/grc/gui/FlowGraph.py index 8a908ff50..35ccf5e27 100644 --- a/grc/gui/FlowGraph.py +++ b/grc/gui/FlowGraph.py @@ -291,12 +291,13 @@ class FlowGraph(Element): def update(self): """ - Do a global rewrite and validate. - Call update on all elements. + Call the top level rewrite and validate. + Call the top level create labels and shapes. """ self.rewrite() self.validate() - for element in self.get_elements(): element.update() + self.create_labels() + self.create_shapes() ########################################################################## ## Get Selected -- cgit