mirror of
https://gitlab.com/kauron/jstudy
synced 2024-12-22 16:33:33 +01:00
Fixed Save menuItem bug
This commit is contained in:
parent
ebe97fa49a
commit
9c80a1d722
1 changed files with 2 additions and 4 deletions
|
@ -40,10 +40,9 @@ public class Controller implements Initializable {
|
||||||
@Override
|
@Override
|
||||||
public void initialize(URL url, ResourceBundle resourceBundle) {
|
public void initialize(URL url, ResourceBundle resourceBundle) {
|
||||||
tabPane.getSelectionModel().selectedItemProperty().addListener((change, o, n) -> {
|
tabPane.getSelectionModel().selectedItemProperty().addListener((change, o, n) -> {
|
||||||
if (n.getContent().getId() != null) {
|
if (tabMap.get(n) != null) {
|
||||||
table.set(true);
|
table.set(true);
|
||||||
root.getTop().autosize();
|
} else table.set(false);
|
||||||
}
|
|
||||||
});
|
});
|
||||||
saveMenu.disableProperty().bind(table.not());
|
saveMenu.disableProperty().bind(table.not());
|
||||||
}
|
}
|
||||||
|
@ -81,7 +80,6 @@ public class Controller implements Initializable {
|
||||||
private Tab createTableTab(String name, List<TestItem> list) {
|
private Tab createTableTab(String name, List<TestItem> list) {
|
||||||
try {
|
try {
|
||||||
Tab tab = new Tab(name);
|
Tab tab = new Tab(name);
|
||||||
tab.setId("table" + tab.hashCode());
|
|
||||||
|
|
||||||
FXMLLoader loader = new FXMLLoader(Main.class.getResource("view/table.fxml"));
|
FXMLLoader loader = new FXMLLoader(Main.class.getResource("view/table.fxml"));
|
||||||
Parent tableRoot = loader.load();
|
Parent tableRoot = loader.load();
|
||||||
|
|
Loading…
Reference in a new issue