def brushModeChanged(self):
        """
        Called on selecting a brushMode, sets it in BrushTool as well.
        """
        self.tool.selectedBrushMode = self.brushModeButton.selectedChoice
        self.tool.brushMode = self.tool.brushModes[self.tool.selectedBrushMode]
        self.tool.saveBrushPreset('__temp__')
        self.tool.setupPreview()
        self.tool.showPanel()

        Called on selecting a brushMode, sets it in BrushTool as well.
        
editortools/brush.py