From 1844074b1255888fb519a4b6ffcfac06a27b9f19 Mon Sep 17 00:00:00 2001 From: Stefan Suhren Date: Mon, 15 Jun 2015 14:34:14 +0200 Subject: Fix comma disabled logic --- src/de/fhswf/in/inf/upnfx/view/MainViewController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/de/fhswf') diff --git a/src/de/fhswf/in/inf/upnfx/view/MainViewController.java b/src/de/fhswf/in/inf/upnfx/view/MainViewController.java index 1ee9173..76ab51a 100644 --- a/src/de/fhswf/in/inf/upnfx/view/MainViewController.java +++ b/src/de/fhswf/in/inf/upnfx/view/MainViewController.java @@ -102,7 +102,7 @@ public class MainViewController private void initialize() { txtField.textProperty().addListener(e -> { - btnComma.setDisable(!newNumber.isEmpty().get() && newNumber.get().contains(".")); + btnComma.setDisable(newNumber.isEmpty().get() || newNumber.get().contains(".")); btnZero.setDisable(!newNumber.isEmpty().get() && !newNumber.get().contains(".") && newNumber.get().startsWith("0")); }); -- cgit v1.2.3-70-g09d2