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.
This commit is contained in:
Arne Keller 2021-08-30 15:54:55 +02:00
parent fbb80ae3ad
commit 26b2bd9f00

View File

@ -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 {