From 5b4553eabfb63194cf0eb4c7ca4802e783f7791e Mon Sep 17 00:00:00 2001 From: Starryi Date: Thu, 26 Aug 2021 14:21:28 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-58009=20=E3=80=90=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E3=80=91=E8=BF=9C=E7=A8=8B=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E4=B8=BB=E9=A2=98=E9=A1=B5=E9=9D=A2=E7=9A=84?= =?UTF-8?q?=EF=BC=8C=E6=A8=A1=E6=9D=BF=E4=B8=BB=E9=A2=98=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=85=A5=E5=8F=A3=E6=B2=A1=E6=9C=89=E5=B1=8F=E8=94=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 链接至远程工作目录且无权限时,屏蔽主题管理对话框入口 【改动思路】 同上 --- .../dialog/TemplateThemeUsingDialog.java | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeUsingDialog.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeUsingDialog.java index adf25b88a3..1d17bb4eb2 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeUsingDialog.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeUsingDialog.java @@ -12,6 +12,7 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.theme.TemplateThemeListPane; import com.fr.design.mainframe.theme.ui.BorderUtils; import com.fr.stable.StringUtils; +import com.fr.workspace.WorkContext; import javax.swing.BorderFactory; import javax.swing.JPanel; @@ -26,7 +27,8 @@ import java.awt.event.ActionListener; * @version 1.0 * Created by Starryi on 2021/8/13 */ -public class TemplateThemeUsingDialog extends TemplateThemeDialog { +public class +TemplateThemeUsingDialog extends TemplateThemeDialog { public static final int CONTENT_WIDTH = 660; public static final int CONTENT_HEIGHT = 515; @@ -107,19 +109,18 @@ public class TemplateThemeUsingDialog extends TemplateT } private UIButton createOpenThemeManagerButton() { - if (DesignModeContext.isAuthorityEditing()) { - // 权限编辑模式下,不显示打开主题管理对话框的按钮 - return null; + if (WorkContext.getCurrent().isRoot()) { + UIButton button = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Manager_Dialog_Title")); + button.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + TemplateThemeManageDialog dialog = new TemplateThemeManageDialog(TemplateThemeUsingDialog.this); + dialog.setVisible(true); + } + }); + return button; } - UIButton button = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Manager_Dialog_Title")); - button.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - TemplateThemeManageDialog dialog = new TemplateThemeManageDialog(TemplateThemeUsingDialog.this); - dialog.setVisible(true); - } - }); - return button; + return null; } private UIButton createUsingCurrentThemeButton() {