chosen example can be unchosen via ctrl also

This commit is contained in:
Ozbolt Menegatti 2020-01-04 14:36:39 +01:00
parent 571ad0c5a0
commit ed16384063

View File

@ -49,6 +49,10 @@ class ShowExampleEdit(CtrlClickMessage):
def update_model_ctrl(self, model): def update_model_ctrl(self, model):
example = self.get_arg(0, Example) example = self.get_arg(0, Example)
if example in model.chosen_examples:
model.chosen_examples.remove(example)
else:
model.chosen_examples.append(example) model.chosen_examples.append(example)
def reset(self): def reset(self):