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,7 +49,11 @@ 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)
model.chosen_examples.append(example)
if example in model.chosen_examples:
model.chosen_examples.remove(example)
else:
model.chosen_examples.append(example)
def reset(self): def reset(self):
# special case, when choosing messages dont reset # special case, when choosing messages dont reset