Skip to content

Commit 110a58b

Browse files
authored
修复添加实例目录页面有一个空 Tooltip 的问题 (#5112)
1 parent 5a25ba6 commit 110a58b

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

HMCL/src/main/java/org/jackhuang/hmcl/ui/construct/FileItem.java

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import javafx.beans.property.SimpleStringProperty;
2424
import javafx.beans.property.StringProperty;
2525
import javafx.scene.control.Label;
26-
import javafx.scene.control.Tooltip;
2726
import javafx.scene.layout.BorderPane;
2827
import javafx.scene.layout.VBox;
2928
import javafx.stage.DirectoryChooser;
@@ -45,7 +44,6 @@ public class FileItem extends BorderPane {
4544

4645
private final SimpleStringProperty name = new SimpleStringProperty(this, "name");
4746
private final SimpleStringProperty title = new SimpleStringProperty(this, "title");
48-
private final SimpleStringProperty tooltip = new SimpleStringProperty(this, "tooltip");
4947
private final SimpleStringProperty path = new SimpleStringProperty(this, "path");
5048
private final SimpleBooleanProperty convertToRelativePath = new SimpleBooleanProperty(this, "convertToRelativePath");
5149

@@ -65,10 +63,6 @@ public FileItem() {
6563
FXUtils.installFastTooltip(right, i18n("button.edit"));
6664
setRight(right);
6765

68-
Tooltip tip = new Tooltip();
69-
tip.textProperty().bind(tooltipProperty());
70-
Tooltip.install(this, tip);
71-
7266
convertToRelativePath.addListener(onInvalidating(() -> path.set(processPath(path.get()))));
7367
}
7468

@@ -142,18 +136,6 @@ public void setTitle(String title) {
142136
this.title.set(title);
143137
}
144138

145-
public String getTooltip() {
146-
return tooltip.get();
147-
}
148-
149-
public StringProperty tooltipProperty() {
150-
return tooltip;
151-
}
152-
153-
public void setTooltip(String tooltip) {
154-
this.tooltip.set(tooltip);
155-
}
156-
157139
public String getPath() {
158140
return path.get();
159141
}

0 commit comments

Comments
 (0)