Fix ScrenPanel first repainting if server blocks.

This commit is contained in:
2025-12-12 16:00:15 +01:00
parent 0056b0e113
commit d9f0c743ad
2 changed files with 4 additions and 3 deletions

View File

@@ -7,7 +7,6 @@ import ch.psi.pshell.epics.ChannelInteger;
import ch.psi.pshell.epics.Epics;
import ch.psi.pshell.imaging.Overlay;
import ch.psi.pshell.imaging.Overlays;
import ch.psi.pshell.imaging.Source;
import ch.psi.pshell.workbench.App;
import ch.psi.pshell.framework.Context;
import ch.psi.pshell.framework.Panel;
@@ -72,7 +71,8 @@ public class ScreenPanelSF extends Panel implements CamServerViewer.CamServerVie
@Override
public void onStart() {
super.onStart();
super.onStart();
repaint(); //Even if invoked, amServerViewer.initialize can block first painting if server is not reachable.
try {
SwingUtilities.invokeLater(()->{
try {

View File

@@ -100,8 +100,9 @@ public class ScreenPanelSLS extends Panel implements CamServerViewer.CamServerVi
}
@Override
public void onStart() {
public void onStart() {
super.onStart();
repaint(); //Even if invoked, ServerViewer.initialize can block first painting if server is not reachable.
try {
SwingUtilities.invokeLater(()->{
try {