def current_patch(self):
    selected_index = self.currentRow()
    if (0 <= selected_index < len(self.items)):
        return self.items[selected_index]
    else:
        return None
def current_patch(self):
    selected_index = self.currentRow()
    if (0 <= selected_index < len(self.items)):
        return self.items[selected_index]
    else:
        return None