From 26b2bd9f0001f5d322018287ddc19b8c65310736 Mon Sep 17 00:00:00 2001 From: Arne Keller Date: Mon, 30 Aug 2021 15:54:55 +0200 Subject: [PATCH] Fix incorrectly disabled buttons If the last step is currently shown and the user switches to step 0, the next/last buttons have to be re-enabled. --- .../view/content/typeinferencecontent/TypeInferenceView.java | 4 ++++ 1 file changed, 4 insertions(+) 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 e526289..d920bf2 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 @@ -165,7 +165,11 @@ public class TypeInferenceView extends VerticalLayout if (currentStep == 0) { controlPanel.setEnabledFirstStep(false); controlPanel.setEnabledPreviousStep(false); + controlPanel.setEnabledNextStep(true); + controlPanel.setEnabledLastStep(true); } else if (currentStep == unification.getStepCount() - 1) { + controlPanel.setEnabledFirstStep(true); + controlPanel.setEnabledPreviousStep(true); controlPanel.setEnabledNextStep(false); controlPanel.setEnabledLastStep(false); } else {