Browse Source

设计器外双击模板打开,设计器内会额外打开一个空白的cpt

final/10.0
hades 3 years ago
parent
commit
38a74b9a4a
  1. 9
      designer-base/src/main/java/com/fr/design/utils/DesignUtils.java

9
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));
}
});
}
}
}

Loading…
Cancel
Save