From 38a74b9a4a27f8f9c0fec4eecdbba1a4e07bac71 Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 27 Jul 2021 11:52:58 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=99=A8=E5=A4=96=E5=8F=8C?= =?UTF-8?q?=E5=87=BB=E6=A8=A1=E6=9D=BF=E6=89=93=E5=BC=80=EF=BC=8C=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E5=86=85=E4=BC=9A=E9=A2=9D=E5=A4=96=E6=89=93?= =?UTF-8?q?=E5=BC=80=E4=B8=80=E4=B8=AA=E7=A9=BA=E7=99=BD=E7=9A=84cpt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/utils/DesignUtils.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java b/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java index 58f5d2a5f..8bd4e880d 100644 --- a/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java +++ b/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java @@ -10,6 +10,7 @@ import com.fr.design.fun.DesignerEnvProcessor; import com.fr.design.gui.UILookAndFeel; import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.DesignerContext; +import com.fr.design.ui.util.UIUtil; import com.fr.exit.DesignerExiter; import com.fr.file.FileFILE; import com.fr.general.ComparatorUtils; @@ -205,7 +206,13 @@ public class DesignUtils { isMatch = isMatch || path.endsWith(suffix); } if (isMatch) { - DesignerContext.getDesignerFrame().openTemplate(new FileFILE(f)); + // ui线程作为打开入口 + UIUtil.invokeLaterIfNeeded(new Runnable() { + @Override + public void run() { + DesignerContext.getDesignerFrame().openTemplate(new FileFILE(f)); + } + }); } } }