godot/ui/graph_editor.py
def _add_listeners ( self ):
        """ Adds the event listeners for a specified object.
        """
        object = self.value
        canvas = self.factory.canvas
        if canvas is not None:
            for name in canvas.node_children:
                object.on_trait_change(self._nodes_replaced, name)
                object.on_trait_change(self._nodes_changed, name + "_items")

            for name in canvas.edge_children:
                object.on_trait_change(self._edges_replaced, name)
                object.on_trait_change(self._edges_changed, name + "_items")
        else:
            raise ValueError("Graph canvas not set for graph editor.")
def _add_listeners ( self ):
        object = self.value
        canvas = self.factory.canvas
        if canvas is not None:
            for name in canvas.node_children:
                object.on_trait_change(self._nodes_replaced, name)
                object.on_trait_change(self._nodes_changed, name + "_items")

            for name in canvas.edge_children:
                object.on_trait_change(self._edges_replaced, name)
                object.on_trait_change(self._edges_changed, name + "_items")
        else:
            raise ValueError("Graph canvas not set for graph editor.")
def _add_listeners ( self ) : object = self . value canvas = self . factory . canvas if canvas is not None : for name in canvas . node_children : object . on_trait_change ( self . _nodes_replaced , name ) object . on_trait_change ( self . _nodes_changed , name + "_items" ) for name in canvas . edge_children : object . on_trait_change ( self . _edges_replaced , name ) object . on_trait_change ( self . _edges_changed , name + "_items" ) else : raise ValueError ( "Graph canvas not set for graph editor." )
Adds the event listeners for a specified object.
Adds the event listeners for a specified object .