From daa5837589f010280911d3732540c771280a343e Mon Sep 17 00:00:00 2001 From: Starryi Date: Tue, 7 Jun 2022 11:24:36 +0800 Subject: [PATCH 1/3] =?UTF-8?q?REPORT-71957=20=E7=BB=84=E4=BB=B6=E5=A4=8D?= =?UTF-8?q?=E7=94=A8-=E5=88=9B=E5=BB=BA=E7=BB=84=E4=BB=B6=EF=BC=8C?= =?UTF-8?q?=E7=A1=AE=E8=AE=A4=E5=90=8E=E6=8F=90=E7=A4=BA=E5=85=B1=E4=BA=AB?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=88=9B=E5=BB=BA=E5=A4=B1=E8=B4=A5=EF=BC=8C?= =?UTF-8?q?=E4=B8=94=E6=97=A5=E5=BF=97=E6=9C=89=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 生成组件时需要使用组件名称作为文件名创建临时文件,而组件名称中可能 包含不合法字符,导致临时文件创建失败。虽然这种文件创建失败的情况 只会在特定操作系统上出现,但考虑到共享组件跨平台应用的可能性,因此 需要统一检查组件名称的合法性,以便在使用时能使用此名称创建文件。 若创建组件时名称非法,则给出提示。 【改动思路】 同上 【review建议】 --- .../java/com/fr/design/share/ui/generate/ShareMainPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/design/share/ui/generate/ShareMainPane.java b/designer-realize/src/main/java/com/fr/design/share/ui/generate/ShareMainPane.java index 0518c6884f..70ec2b6f9c 100644 --- a/designer-realize/src/main/java/com/fr/design/share/ui/generate/ShareMainPane.java +++ b/designer-realize/src/main/java/com/fr/design/share/ui/generate/ShareMainPane.java @@ -660,7 +660,7 @@ public class ShareMainPane extends JPanel { Toolkit.i18nText("Fine-Design_Basic_Error"), ERROR_MESSAGE, UIManager.getIcon("OptionPane.errorIcon")); return false; } - if (FileCommonUtils.isFileNameValid(name)) { + if (!FileCommonUtils.isFileNameValid(name)) { FineJOptionPane.showMessageDialog( shareDialog, Toolkit.i18nText("Fine-Design_Share_Generate_Failure_Illegal_Component_Name_Tip"), From ec34322f895298b89be3ba0f0d8bffb8a10e6eba Mon Sep 17 00:00:00 2001 From: "Bruce.Deng" Date: Thu, 9 Jun 2022 11:35:11 +0800 Subject: [PATCH 2/3] =?UTF-8?q?REPORT-73256=20=E6=96=87=E6=9C=AC=E8=B6=85?= =?UTF-8?q?=E5=87=BA=E5=90=8E=E9=9A=90=E8=97=8F=E8=AE=BE=E7=BD=AE=E4=BC=9A?= =?UTF-8?q?=E5=BD=B1=E5=93=8D=E5=8D=95=E5=85=83=E6=A0=BC=E5=9F=BA=E6=9C=AC?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/cell/settingpane/CellOtherSetPane.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java index 742629af01..6e5f1e3bd7 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java @@ -79,6 +79,7 @@ public class CellOtherSetPane extends AbstractCellAttrPane { //文本超出时隐藏 private UICheckBox textOverflowCheckBox; + private int curSelectedIndex; private UIComboBox showPartComboBox; private CardLayout showPartLayout; private JPanel showPartPane; @@ -325,7 +326,15 @@ public class CellOtherSetPane extends AbstractCellAttrPane { showPartLayout.show(showPartPane, "none"); showPartPane.setPreferredSize(new Dimension(0, 0)); } + // 记录目前自动调整哪个被选中 + for (int i = 0; i < adjustRadioButtons.length; i++) { + if (adjustRadioButtons[i].isSelected()) { + curSelectedIndex = i; + } + } noAutoRadioButton.setSelected(true); + } else { + adjustRadioButtons[curSelectedIndex].setSelected(true); } } }); From 950d4881a54ec4f2e324261ebdb80dba5959d9d2 Mon Sep 17 00:00:00 2001 From: "Bruce.Deng" Date: Thu, 9 Jun 2022 11:37:48 +0800 Subject: [PATCH 3/3] =?UTF-8?q?REPORT-73256=20=E6=96=87=E6=9C=AC=E8=B6=85?= =?UTF-8?q?=E5=87=BA=E5=90=8E=E9=9A=90=E8=97=8F=E8=AE=BE=E7=BD=AE=E4=BC=9A?= =?UTF-8?q?=E5=BD=B1=E5=93=8D=E5=8D=95=E5=85=83=E6=A0=BC=E5=9F=BA=E6=9C=AC?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/cell/settingpane/CellOtherSetPane.java | 1 + 1 file changed, 1 insertion(+) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java index 6e5f1e3bd7..4cddfea738 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java @@ -330,6 +330,7 @@ public class CellOtherSetPane extends AbstractCellAttrPane { for (int i = 0; i < adjustRadioButtons.length; i++) { if (adjustRadioButtons[i].isSelected()) { curSelectedIndex = i; + break; } } noAutoRadioButton.setSelected(true);