refresh list on open and populate file name to list name
This commit is contained in:
parent
d80f7151ea
commit
9bcd99dcf8
@ -30,12 +30,15 @@ public class FMObjListEditTab extends Tab {
|
|||||||
|
|
||||||
FMObjListPaneEditController control = (FMObjListPaneEditController) loader.getController();
|
FMObjListPaneEditController control = (FMObjListPaneEditController) loader.getController();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public FMObjListEditTab(FMObjList list) throws IOException {
|
public FMObjListEditTab(FMObjList list) throws IOException {
|
||||||
|
|
||||||
setText("List");
|
if (list.getGroupName() != null) {
|
||||||
|
setText(list.getGroupName());
|
||||||
|
}else {
|
||||||
|
setText("list");
|
||||||
|
}
|
||||||
|
|
||||||
FXMLLoader loader = new FXMLLoader(getClass().getResource("ui/FMObjListPaneEdit.fxml"));
|
FXMLLoader loader = new FXMLLoader(getClass().getResource("ui/FMObjListPaneEdit.fxml"));
|
||||||
|
|
||||||
|
@ -680,6 +680,8 @@ public class ControllerMain {
|
|||||||
|
|
||||||
ListPersister persist = new ListPersister();
|
ListPersister persist = new ListPersister();
|
||||||
FMObjList list = persist.readListFromFile(file);
|
FMObjList list = persist.readListFromFile(file);
|
||||||
|
list.setGroupName(file.getName());
|
||||||
|
list.refresh();
|
||||||
try {
|
try {
|
||||||
addTab(new FMObjListEditTab(list));
|
addTab(new FMObjListEditTab(list));
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user