code clean up
* removed old reloadRomBtn code * fixed an issue where the saveSettings after successfully syncing to the cloud failed
This commit is contained in:
parent
e0a73a1fbe
commit
46c57ef330
|
@ -733,7 +733,6 @@ public class MainWindowController {
|
|||
@FXML
|
||||
void reloadRomsBtnAction() throws IOException {
|
||||
|
||||
//TODO needs testing
|
||||
JFXSpinner spinner = new JFXSpinner();
|
||||
spinner.setPrefSize(30, 30);
|
||||
main.pane.getChildren().add(spinner);
|
||||
|
@ -744,19 +743,14 @@ public class MainWindowController {
|
|||
@Override
|
||||
public void run() {
|
||||
dbController.loadRomDirectory(getRomPath()); // reload the rom directory
|
||||
refreshUIData(); // refresh the list of games displayed on screen
|
||||
|
||||
Platform.runLater(() -> {
|
||||
refreshUIData(); // refresh the list of games displayed on screen
|
||||
main.pane.getChildren().remove(spinner);
|
||||
});
|
||||
}
|
||||
});
|
||||
thread.start();
|
||||
|
||||
// reloadRomsBtn.setText("reloading...");
|
||||
// dbController.loadRomDirectory(getRomPath());
|
||||
// Runtime.getRuntime().exec("java -jar cemu_UI.jar"); // start again (preventing Bugs)
|
||||
// System.exit(0); // finishes itself
|
||||
}
|
||||
|
||||
@FXML
|
||||
|
|
|
@ -106,7 +106,7 @@ public class CloudController {
|
|||
@Override
|
||||
public void run() {
|
||||
Platform.runLater(() -> {
|
||||
mwc.getPlayBtn().setText("syncing...");
|
||||
mwc.getPlayBtn().setText("syncing..."); // FIXME we get a NullPointerException here, because playBtn dosen't exist
|
||||
});
|
||||
LOGGER.info("starting synchronization in new thread ...");
|
||||
|
||||
|
@ -121,9 +121,9 @@ public class CloudController {
|
|||
|
||||
}
|
||||
Platform.runLater(() -> {
|
||||
mwc.getPlayBtn().setText("play");
|
||||
mwc.getPlayBtn().setText("play"); // FIXME we get a NullPointerException here, because playBtn dosen't exist
|
||||
mwc.saveSettings();
|
||||
});
|
||||
mwc.saveSettings();
|
||||
LOGGER.info("synchronization successful!");
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue