From 8c595308481f7e3e852d78d1f90f01a456dd9930 Mon Sep 17 00:00:00 2001 From: plough Date: Fri, 24 Aug 2018 10:41:40 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-10490=20=E3=80=90=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E5=8D=87=E7=BA=A710.0=E3=80=91=E8=BF=9C=E7=A8=8B=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5=E6=96=AD=E5=BC=80=E5=90=8E=EF=BC=8C=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E6=A1=86=E6=98=BE=E7=A4=BA=E7=A9=BA=E7=99=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/socketio/DesignerSocketIO.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java b/designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java index 33f1558b9..6318d0e05 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java @@ -23,6 +23,7 @@ import io.socket.emitter.Emitter; import javax.swing.*; import java.io.IOException; +import java.lang.reflect.InvocationTargetException; import java.net.URI; import java.net.URL; @@ -80,9 +81,17 @@ public class DesignerSocketIO { @Override public void call(Object... objects) { if (status != Status.Disconnecting) { - JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Remote_Disconnected"), - null, 0, UIManager.getIcon("OptionPane.errorIcon")); - TemplatePane.getInstance().editItems(); + try { + SwingUtilities.invokeAndWait(new Runnable() { + public void run() { + JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Remote_Disconnected"), + null, 0, UIManager.getIcon("OptionPane.errorIcon")); + TemplatePane.getInstance().editItems(); + } + }); + } catch (Exception e) { + FineLoggerFactory.getLogger().error(e.getMessage(), e); + } } status = Status.Disconnected; }