From 29caff2ead538665bf7648b2a651d405d56a2410 Mon Sep 17 00:00:00 2001 From: ucrhh Date: Sun, 14 Mar 2021 11:53:10 +0100 Subject: [PATCH] fix bug with unification translation --- .../content/typeinferencecontent/TypeInferenceView.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/edu/kit/typicalc/view/content/typeinferencecontent/TypeInferenceView.java b/src/main/java/edu/kit/typicalc/view/content/typeinferencecontent/TypeInferenceView.java index ae87d9c..e1235a5 100644 --- a/src/main/java/edu/kit/typicalc/view/content/typeinferencecontent/TypeInferenceView.java +++ b/src/main/java/edu/kit/typicalc/view/content/typeinferencecontent/TypeInferenceView.java @@ -60,7 +60,7 @@ public class TypeInferenceView extends VerticalLayout private MathjaxUnification unification; - private MathjaxProofTree tree; + private MathjaxProofTree tree = null; private transient LatexCreator lc; private final transient TypeInfererInterface typeInferer; private final Div content; @@ -109,7 +109,11 @@ public class TypeInferenceView extends VerticalLayout Div container = new Div(); container.setId(CONTENT_ID2); unification = new MathjaxUnification(lc.getUnification()); - tree = new MathjaxProofTree(lc.getTree()); + + if (tree == null) { + tree = new MathjaxProofTree(lc.getTree()); + } + Div treeDiv = new Div(); treeDiv.setId(CONTENT_ID3); treeDiv.add(tree, button);