godot/mapping.py
def clear_canvas(self):
        """ Removes all components from the canvas """

        logger.debug("Clearing the diagram canvas!")
        old_canvas = self.diagram_canvas

#        logger.debug("Canvas components: %s" % canvas.components)
#        for component in canvas.components:
#            canvas.remove(component)
#        logger.debug("Canvas components: %s" % canvas.components)
#        for component in canvas.components:
#            canvas.remove(component)
#        logger.debug("Canvas components: %s" % canvas.components)
#        canvas.request_redraw()

        new_canvas = Canvas()
        new_canvas.copy_traits(old_canvas, ["bgcolor", "draw_axes"])
        self.diagram_canvas = new_canvas

        self.viewport.component=new_canvas
        self.viewport.request_redraw()

        return
def clear_canvas(self):
        logger.debug("Clearing the diagram canvas!")
        old_canvas = self.diagram_canvas

#        logger.debug("Canvas components: %s" % canvas.components)
#        for component in canvas.components:
#            canvas.remove(component)
#        logger.debug("Canvas components: %s" % canvas.components)
#        for component in canvas.components:
#            canvas.remove(component)
#        logger.debug("Canvas components: %s" % canvas.components)
#        canvas.request_redraw()

        new_canvas = Canvas()
        new_canvas.copy_traits(old_canvas, ["bgcolor", "draw_axes"])
        self.diagram_canvas = new_canvas

        self.viewport.component=new_canvas
        self.viewport.request_redraw()

        return
def clear_canvas ( self ) : logger . debug ( "Clearing the diagram canvas!" ) old_canvas = self . diagram_canvas #        logger.debug("Canvas components: %s" % canvas.components) #        for component in canvas.components: #            canvas.remove(component) #        logger.debug("Canvas components: %s" % canvas.components) #        for component in canvas.components: #            canvas.remove(component) #        logger.debug("Canvas components: %s" % canvas.components) #        canvas.request_redraw() new_canvas = Canvas ( ) new_canvas . copy_traits ( old_canvas , [ "bgcolor" , "draw_axes" ] ) self . diagram_canvas = new_canvas self . viewport . component = new_canvas self . viewport . request_redraw ( ) return
Removes all components from the canvas
Removes all components from the canvas