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
|
@FXML
|
||||||
void reloadRomsBtnAction() throws IOException {
|
void reloadRomsBtnAction() throws IOException {
|
||||||
|
|
||||||
//TODO needs testing
|
|
||||||
JFXSpinner spinner = new JFXSpinner();
|
JFXSpinner spinner = new JFXSpinner();
|
||||||
spinner.setPrefSize(30, 30);
|
spinner.setPrefSize(30, 30);
|
||||||
main.pane.getChildren().add(spinner);
|
main.pane.getChildren().add(spinner);
|
||||||
|
@ -744,19 +743,14 @@ public class MainWindowController {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
dbController.loadRomDirectory(getRomPath()); // reload the rom directory
|
dbController.loadRomDirectory(getRomPath()); // reload the rom directory
|
||||||
refreshUIData(); // refresh the list of games displayed on screen
|
|
||||||
|
|
||||||
Platform.runLater(() -> {
|
Platform.runLater(() -> {
|
||||||
|
refreshUIData(); // refresh the list of games displayed on screen
|
||||||
main.pane.getChildren().remove(spinner);
|
main.pane.getChildren().remove(spinner);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
thread.start();
|
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
|
@FXML
|
||||||
|
|
|
@ -106,7 +106,7 @@ public class CloudController {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Platform.runLater(() -> {
|
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 ...");
|
LOGGER.info("starting synchronization in new thread ...");
|
||||||
|
|
||||||
|
@ -121,9 +121,9 @@ public class CloudController {
|
||||||
|
|
||||||
}
|
}
|
||||||
Platform.runLater(() -> {
|
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!");
|
LOGGER.info("synchronization successful!");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue