def presetSelected(self):
        """
        Called ons selecting item on Load Preset, to check if remove preset is selected. Calls removePreset if true, loadPreset(name) otherwise.
        """
        choice = self.presetListButton.selectedChoice
        if choice == 'Remove Presets':
            self.removePreset()
        elif choice == 'Load Preset':
            return
        else:
            self.tool.loadBrushPreset(choice)
        self.tool.showPanel()

        Called ons selecting item on Load Preset, to check if remove preset is selected. Calls removePreset if true, loadPreset(name) otherwise.
        
editortools/brush.py