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