diff --git a/README.md b/README.md index ddca580..4c2f85c 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ even in a "normal" CSV editor. So I decided to write this simple JavaFX applicat [Wiki & Documentation](https://github.com/frosch95/SmartCSV.fx/wiki) -binary distribution of the [latest release (1.3.0)](https://github.com/frosch95/SmartCSV.fx/releases/download/1.3.0/SmartCSV.fx-1.3.0.zip) +binary distribution of the [latest release (1.4.0)](https://github.com/frosch95/SmartCSV.fx/releases/download/1.4.0/SmartCSV.fx-1.4.0.zip) ## Talks [Introduction](http://javafx.ninja/talks/introduction/) diff --git a/build.gradle b/build.gradle index 262fbdf..fb3cb2e 100644 --- a/build.gradle +++ b/build.gradle @@ -48,5 +48,5 @@ test { } group 'ninja.javafx' -version '1.3.0' +version '1.4.0' mainClassName = 'ninja.javafx.smartcsv.Main' diff --git a/src/main/java/ninja/javafx/smartcsv/fx/table/EditableValidationCell.java b/src/main/java/ninja/javafx/smartcsv/fx/table/EditableValidationCell.java index 8892ae1..4657bbc 100644 --- a/src/main/java/ninja/javafx/smartcsv/fx/table/EditableValidationCell.java +++ b/src/main/java/ninja/javafx/smartcsv/fx/table/EditableValidationCell.java @@ -65,8 +65,8 @@ public class EditableValidationCell extends TableCell { @Override public void cancelEdit() { - super.cancelEdit(); setText(getItem().getValue()); + super.cancelEdit(); setContentDisplay(ContentDisplay.TEXT_ONLY); } @@ -113,16 +113,11 @@ public class EditableValidationCell extends TableCell { textField.setMinWidth(this.getWidth() - this.getGraphicTextGap() * 2); textField.setOnKeyPressed(t -> { if (t.getCode() == KeyCode.ENTER) { - commitEdit(textField.getValue()); + runLater(() -> commitEdit(textField.getValue())); } else if (t.getCode() == KeyCode.ESCAPE) { cancelEdit(); } }); - textField.focusedProperty().addListener((observable, oldValue, newValue) -> { - if (!newValue && textField != null) { - commitEdit(textField.getValue()); - } - }); } private static class ValueTextField extends TextField { diff --git a/src/main/resources/ninja/javafx/smartcsv/fx/application.properties b/src/main/resources/ninja/javafx/smartcsv/fx/application.properties index 6e24aed..524c59a 100644 --- a/src/main/resources/ninja/javafx/smartcsv/fx/application.properties +++ b/src/main/resources/ninja/javafx/smartcsv/fx/application.properties @@ -1,5 +1,5 @@ application.name = SmartCSV.fx -application.version = 1.3.0 +application.version = 1.4.0 # fxml views fxml.smartcvs.view = /ninja/javafx/smartcsv/fx/smartcsv.fxml