From 7c96c453a74f2f71c2a0436f9c2b9e84509a6755 Mon Sep 17 00:00:00 2001 From: Starryi Date: Wed, 25 Aug 2021 19:29:44 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-58089=20=E3=80=90=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E3=80=91=E5=8D=95=E5=85=83=E6=A0=BC=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E9=87=8D=E5=90=8D=E4=BB=A5=E5=90=8E=E5=8F=98=E6=88=90?= =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D=EF=BC=8C=E4=BC=9A=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E5=A4=9A=E4=B8=AA=E9=87=8D=E5=91=BD=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 重命名主题配置中的单元格样式时,若出现名称为空或 名称重复的情况,则直接恢复为旧名称 【改动思路】 同上 --- .../fr/design/mainframe/theme/edit/CellStyleListEditPane.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/CellStyleListEditPane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/CellStyleListEditPane.java index 2c2466eaf..29325592d 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/CellStyleListEditPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/CellStyleListEditPane.java @@ -67,10 +67,12 @@ public class CellStyleListEditPane extends JListControlPane { allNames[index] = StringUtils.EMPTY; if (StringUtils.isEmpty(newName)) { showTipDialogAndReset(i18nText("Fine-Design_Basic_Predefined_Style_Empty_Name"), index); + nameableList.setNameAt(oldName, index); return; } if (isNameRepeated(new List[]{Arrays.asList(allNames)}, newName)) { showTipDialogAndReset(i18nText("Fine-Design_Basic_Predefined_Style_Duplicate_Name", newName), index); + nameableList.setNameAt(oldName, index); return; } populateSelectedValue(); @@ -249,6 +251,7 @@ public class CellStyleListEditPane extends JListControlPane { super(i18nText("Fine-Design_Predefined_Cell_New_Style"), ThemedCellStyle.class, updatePane); } + @Override public Nameable createNameable(UnrepeatedNameHelper helper) { ThemedCellStyle cellStyle = new ThemedCellStyle(); cellStyle.setName(menuName); @@ -260,6 +263,7 @@ public class CellStyleListEditPane extends JListControlPane { return new NameObject(helper.createUnrepeatedName(this.menuName()), cellStyle); } + @Override public Object acceptObject2Populate(Object ob) { if (ob instanceof NameObject) { ob = ((NameObject) ob).getObject();