From 62a1fd5cf1855878aa49a8df1d43c83072ee402c Mon Sep 17 00:00:00 2001 From: Ozbolt Menegatti Date: Wed, 22 Apr 2020 14:22:23 +0200 Subject: [PATCH] changing the befaviour of examples_shown button --- src/model/example/example.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/model/example/example.py b/src/model/example/example.py index f37e690..183f711 100644 --- a/src/model/example/example.py +++ b/src/model/example/example.py @@ -16,7 +16,6 @@ class Example(Data): self.inner = None self.components = [] - def import_xml(self, example_xml): self.translations = from_container_list(example_xml.querySelectorAll("translationContainer")) @@ -67,9 +66,9 @@ class Example(Data): if "logDice" in other_attributes: example_content.append(h("span.example-logdice", {}, other_attributes["logDice"])) - parent_display = "inherit" - if not model.examples_shown and not self.is_multiword(): - parent_display = "none" + parent_display = "none" + if model.examples_shown or self.is_multiword() or len(self.translations) > 0: + parent_display = "inherit" clusters_display = "inherit" if not model.clusters_shown: