show/hide examples

This commit is contained in:
2020-01-25 23:22:23 +01:00
parent 27409b6f63
commit 932400a06c
5 changed files with 31 additions and 4 deletions

View File

@@ -62,6 +62,10 @@ class Example(Editable):
def set_cluster(self, cluster):
self.inner.cluster = cluster
def is_collocation(self):
return type(self.inner) is CorpusExample
class CorpusExample:
def __init__(self, example_xml):
@@ -81,6 +85,7 @@ class CorpusExample:
def get_valid_cluster(self):
return None
class MultiwordExample:
def __init__(self, example_xml):

View File

@@ -22,8 +22,9 @@ class Model:
self.translation = None
self.sense = None
# choosing examples
# choosing and hiding examples
self.chosen_examples = []
self.examples_shown = True
self.reset()
self.modal_reset()