'Add handling of the spin box for maximal number of attributes.
Disable the spin for maximal number of attributes before running and
enable afterwards. Also, if the number of attributes is different than
in the last run, reset the saved state (if it was paused).'

def run(self):

    if (self.max_attrs != self.last_run_max_attr):
        self.saved_state = None
        self.saved_progress = 0
    if (self.saved_state is None):
        self.scores = []
        self.rank_model.clear()
    self.compute_attr_order()
    self.last_run_max_attr = self.max_attrs
    self.max_attr_spin.setDisabled(True)
    try:
        super().run()
    finally:
        self.max_attr_spin.setDisabled(False)
