From 69172c6ea4c1bf8d2f842df944f391732c6667e6 Mon Sep 17 00:00:00 2001 From: LeeWyatt Date: Fri, 15 Sep 2023 18:05:57 +0900 Subject: [PATCH] Fix the error where button 1 is displayed, button 2 is hidden, but the Separator between button 1 and button 2 is shown. --- .../com/dlsc/jfxcentral2/components/tiles/TileView.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/src/main/java/com/dlsc/jfxcentral2/components/tiles/TileView.java b/components/src/main/java/com/dlsc/jfxcentral2/components/tiles/TileView.java index 8c0908cc..5a816599 100644 --- a/components/src/main/java/com/dlsc/jfxcentral2/components/tiles/TileView.java +++ b/components/src/main/java/com/dlsc/jfxcentral2/components/tiles/TileView.java @@ -109,10 +109,6 @@ public TileView(T item) { button1.managedProperty().bind(button1.visibleProperty()); button1.visibleProperty().bind(button1TextProperty().isNotEmpty().or(button1GraphicProperty().isNotNull())); - Separator separator1 = new Separator(Orientation.VERTICAL); - separator1.managedProperty().bind(button1.visibleProperty()); - separator1.visibleProperty().bind(button1.visibleProperty()); - button2 = new Button(); button2.setFocusTraversable(false); button2.getStyleClass().addAll("bg-transparent-button", "button2"); @@ -121,6 +117,10 @@ public TileView(T item) { button2.managedProperty().bind(button2.visibleProperty()); button2.visibleProperty().bind(button2TextProperty().isNotEmpty().or(button2GraphicProperty().isNotNull())); + Separator separator1 = new Separator(Orientation.VERTICAL); + separator1.managedProperty().bind(button1.visibleProperty()); + separator1.visibleProperty().bind(button1.visibleProperty().and(button2.visibleProperty())); + Separator separator2 = new Separator(Orientation.VERTICAL); separator2.managedProperty().bind(button2.visibleProperty()); separator2.visibleProperty().bind(button2.visibleProperty());