MicroFix
This commit is contained in:
@@ -164,17 +164,13 @@ public class TCPClient implements IClient {
|
||||
if (event.getIsError()) {
|
||||
controller.view.showError(event.toString());
|
||||
} else {
|
||||
Platform.runLater(() -> {
|
||||
event.apply(controller.miniModel);
|
||||
controller.view.render();
|
||||
});
|
||||
event.apply(controller.miniModel);
|
||||
controller.view.render();
|
||||
}
|
||||
|
||||
} else if (read instanceof MiniModel model) {
|
||||
Platform.runLater(() -> {
|
||||
controller.setModel(model);
|
||||
controller.view.render();
|
||||
});
|
||||
controller.setModel(model);
|
||||
controller.view.render();
|
||||
}
|
||||
|
||||
} catch (ClassNotFoundException e) {
|
||||
|
||||
@@ -130,8 +130,10 @@ public class GUI extends Application implements IView {
|
||||
@Override
|
||||
public void showError(String message) {
|
||||
Platform.runLater(() -> {
|
||||
controllerMain.isError = true;
|
||||
controllerMain.render();
|
||||
synchronized (miniModel) {
|
||||
controllerMain.isError = true;
|
||||
controllerMain.render();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user