Re/evaluate the notebook blocks label because we dont garuntee the evaluation priority.
[debian/gnuradio] / grc / base / FlowGraph.py
index 9252f3668b43a2b303dd03b506f019a4c9cbf8ec..ce370ca242036486d975c17676c9e0ab0a0cdfa8 100644 (file)
@@ -68,6 +68,7 @@ class FlowGraph(Element):
        def get_block(self, id): return filter(lambda b: b.get_id() == id, self.get_blocks())[0]
        def get_blocks(self): return filter(lambda e: e.is_block(), self.get_elements())
        def get_connections(self): return filter(lambda e: e.is_connection(), self.get_elements())
+       def get_children(self): return self.get_elements()
        def get_elements(self):
                """
                Get a list of all the elements.
@@ -102,7 +103,6 @@ class FlowGraph(Element):
                @param key the block key
                @return the new block or None if not found
                """
-               self.flag()
                if key not in self.get_parent().get_block_keys(): return None
                block = self.get_parent().get_new_block(self, key)
                self.get_elements().append(block)
@@ -116,7 +116,6 @@ class FlowGraph(Element):
                @throw Exception bad connection
                @return the new connection
                """
-               self.flag()
                connection = self.get_parent().Connection(flow_graph=self, porta=porta, portb=portb)
                self.get_elements().append(connection)
                return connection
@@ -128,7 +127,6 @@ class FlowGraph(Element):
                If the element is a block, remove its connections.
                If the element is a connection, just remove the connection.
                """
-               self.flag()
                if element not in self.get_elements(): return
                #found a port, set to parent signal block
                if element.is_port():
@@ -147,26 +145,6 @@ class FlowGraph(Element):
                """
                raise NotImplementedError
 
-       def rewrite(self):
-               """
-               Rewrite critical structures.
-               Call rewrite on all sub elements.
-               """
-               Element.rewrite(self)
-               for elem in self.get_elements(): elem.rewrite()
-
-       def validate(self):
-               """
-               Validate the flow graph.
-               Validate only the blocks.
-               Connections will be validated within the blocks.
-               """
-               Element.validate(self)
-               for c in self.get_blocks():
-                       c.validate()
-                       if not c.is_valid():
-                               self.add_error_message('Element "%s" is not valid.'%c)
-
        ##############################################
        ## Import/Export Methods
        ##############################################