From 5728ed0fb0a05f41cab69b9d974ccc8bacaa2016 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Fri, 7 Apr 2023 12:00:17 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-93234=20=E4=B8=8D=E6=89=93=E5=BC=80?= =?UTF-8?q?=E4=BB=BB=E4=BD=95=E6=8A=A5=E8=A1=A8=EF=BC=8C=E8=A7=A6=E5=8F=91?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E5=B7=A5=E4=BD=9C=E7=9B=AE=E5=BD=95=EF=BC=8C?= =?UTF-8?q?=E6=A8=A1=E6=9D=BFtab=E4=BC=9A=E8=87=AA=E5=8A=A8=E5=BC=B9?= =?UTF-8?q?=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/toolbar/ToolBarMenuDock.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java b/designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java index 3c75eff39d..3372e2ad13 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java @@ -42,6 +42,7 @@ import com.fr.design.actions.server.GlobalTableDataAction; import com.fr.design.actions.server.PlatformManagerAction; import com.fr.design.actions.server.PluginManagerAction; import com.fr.design.base.mode.DesignModeContext; +import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.file.NewTemplatePane; import com.fr.design.fun.MenuHandler; import com.fr.design.fun.OemProcessor; @@ -275,7 +276,10 @@ public abstract class ToolBarMenuDock { insertTemplateExtendMenu(plus, menuDefs); // 添加模板菜单 - menuList.addAll(Arrays.asList(menuDefs)); + // 如果是JNullTemplate不能添加模板菜单,之前没有这个JNullTemplate所以没考虑 + if (JTemplate.isValid(HistoryTemplateListCache.getInstance().getCurrentEditingTemplate())) { + menuList.addAll(Arrays.asList(menuDefs)); + } // 添加服务器菜单 if (WorkContext.getCurrent() != null && WorkContext.getCurrent().isRoot()) {