From f61c0a40baccf399075ca9dc8b75d914c464009e Mon Sep 17 00:00:00 2001 From: Carlos Galindo Date: Sun, 12 Jun 2016 13:40:15 +0200 Subject: [PATCH] Corrected repeat mistakes, it kept on increasing the bars --- src/main/java/es/kauron/jstudy/controller/TestController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/es/kauron/jstudy/controller/TestController.java b/src/main/java/es/kauron/jstudy/controller/TestController.java index e2cb533..0703406 100644 --- a/src/main/java/es/kauron/jstudy/controller/TestController.java +++ b/src/main/java/es/kauron/jstudy/controller/TestController.java @@ -53,6 +53,8 @@ public class TestController implements Initializable { // Remove the question from the pool if the question was correctly answered or there is no repetition if (right || !AppConfig.repeatWrong) { list.remove(current); + progress.setProgress(progress.getProgress() + 1.0/total); + progressLabel.setText((int) (progress.getProgress() * total) + "/" + total); if (list.size() == 0) { answer.setText(""); answer.setDisable(true); @@ -60,8 +62,6 @@ public class TestController implements Initializable { return; } } - progress.setProgress(progress.getProgress() + 1.0/total); - progressLabel.setText((int) (progress.getProgress() * total) + "/" + total); onSkipAction(event); }