From 8a279ae1cbddf36d394c99137f96ea5c7aa23778 Mon Sep 17 00:00:00 2001 From: Carlos Galindo Date: Fri, 13 Sep 2019 18:21:37 +0200 Subject: [PATCH] Test: removed bug where correcting an error would generate extra items --- .../java/es/kauron/jstudy/controller/TestController.java | 6 ++++-- 1 file changed, 4 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 34523de..9b0e580 100644 --- a/src/main/java/es/kauron/jstudy/controller/TestController.java +++ b/src/main/java/es/kauron/jstudy/controller/TestController.java @@ -108,9 +108,11 @@ public class TestController implements Initializable { } chooseQuestion(); } else if (AppPrefs.repeatImmediately.get()) { - correctingError.set(true); item.set(new TestItem(item.get())); - list.add(item.get()); + if (!correctingError.get()) { + correctingError.set(true); + list.add(item.get()); + } } else { chooseQuestion(); }