diff --git a/src/main/java/ch/psi/mxsc/Controller.java b/src/main/java/ch/psi/mxsc/Controller.java index 96004cb..4fd7efa 100644 --- a/src/main/java/ch/psi/mxsc/Controller.java +++ b/src/main/java/ch/psi/mxsc/Controller.java @@ -697,11 +697,12 @@ public class Controller { try { if (puckLoading) { getMainFrame().evalAsync(name + ".enable(); " + name + ".polling = 100", true).handle(errorHandler); - currentDetection = basePlate.getDetection(); + currentDetection = basePlate.getDetection(); } else if (getState().isInitialized()) { getMainFrame().evalAsync(name + ".polling = 0; " + name + ".disable()", true).handle(errorHandler); - onPuckScanned(null); + onPuckScanned(null); } + getMainFrame().evalAsync("onPuckLoadingChange(" + (puckLoading ? "True" : "False") + ")"); } catch (Exception ex) { errorHandler.apply(null, ex); }