From c7a405fc46201d1854b6de0d01168ac664a10d36 Mon Sep 17 00:00:00 2001 From: LukeItUp Date: Thu, 3 Sep 2020 13:46:14 +0200 Subject: [PATCH] lock in collocations --- src/view/modals.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/view/modals.py b/src/view/modals.py index 0df3d73..7828785 100644 --- a/src/view/modals.py +++ b/src/view/modals.py @@ -64,11 +64,12 @@ def edit_example(example, sense): result.append(h("span.example-component-button.example-component-none", {"on": {"click": role_msg(idx, "none")}}, "N")) - result.extend([ - h("span.example-component-button", - {"on": {"click": message.msg(message.ExampleComponentAdd, example_original, idx)}}, "+"), - h("span.example-component-button", - {"on": {"click": message.msg(message.ExampleComponentRemove, example_original, idx)}}, "-")]) + if "-" not in example.inner.other_attributes["structureName"]: + result.extend([ + h("span.example-component-button", + {"on": {"click": message.msg(message.ExampleComponentAdd, example_original, idx)}}, "+"), + h("span.example-component-button", + {"on": {"click": message.msg(message.ExampleComponentRemove, example_original, idx)}}, "-")]) return result