From 21efe24d7a99a19edb4f6892a5a263582daa9f1c Mon Sep 17 00:00:00 2001 From: Daniel Gyoerffy <49782833+Dansoftowner@users.noreply.github.com> Date: Thu, 15 Apr 2021 10:35:17 +0200 Subject: [PATCH] Binding formatting items visibility to editable property. Closes #17 --- src/main/java/com/dansoftware/mdeditor/Toolbar.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/dansoftware/mdeditor/Toolbar.java b/src/main/java/com/dansoftware/mdeditor/Toolbar.java index b3c05c8..57164b3 100644 --- a/src/main/java/com/dansoftware/mdeditor/Toolbar.java +++ b/src/main/java/com/dansoftware/mdeditor/Toolbar.java @@ -84,6 +84,7 @@ public void changed(ObservableValue> observable, Skin oldVa } } }); + button.visibleProperty().bind(control.editableProperty()); button.setId(id); button.setOnAction(e -> formatText(pattern)); return button;