def showPanel(self):
        """
        Removes old panels.
        Makes new panel instance and add it to leveleditor.
        """
        if self.panel:
            self.panel.parent.remove(self.panel)
        panel = BrushPanel(self)
        panel.centery = self.editor.centery
        panel.left = self.editor.left
        panel.anchor = "lwh"
        self.panel = panel
        self.editor.add(panel)

        Removes old panels.
        Makes new panel instance and add it to leveleditor.
        
editortools/brush.py