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 58f5d2a5f6..8bd4e880d9 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)); + } + }); } } }