Browse Source

Pull request #5134: REPORT-55846 设计器外双击模板打开,设计器内会额外打开一个空白的cpt

Merge in DESIGN/design from ~HADES/design:final/10.0 to final/10.0

* commit '38a74b9a4a27f8f9c0fec4eecdbba1a4e07bac71':
  设计器外双击模板打开,设计器内会额外打开一个空白的cpt
final/10.0
Kara 3 years ago
parent
commit
512fb580de
  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.gui.UILookAndFeel;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.ui.util.UIUtil;
import com.fr.exit.DesignerExiter; import com.fr.exit.DesignerExiter;
import com.fr.file.FileFILE; import com.fr.file.FileFILE;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
@ -205,7 +206,13 @@ public class DesignUtils {
isMatch = isMatch || path.endsWith(suffix); isMatch = isMatch || path.endsWith(suffix);
} }
if (isMatch) { 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