From 31adf7261729f1f281eea0ade0497e7340d44709 Mon Sep 17 00:00:00 2001 From: Yvan Date: Wed, 1 Jun 2022 14:13:14 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-72766=20=E4=BF=9D=E5=AD=98=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=EF=BC=8C=E5=B7=B2=E9=80=89=E6=8B=A9=E7=9A=84=E5=8A=A8?= =?UTF-8?q?=E4=BD=9C=E5=BA=94=E4=B8=AD=E6=96=AD=20=E3=80=90=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E5=8E=9F=E5=9B=A0=E3=80=91=E4=BB=A5=E5=89=8D=E7=9A=84?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E6=98=AF=E5=8F=91=E7=8E=B0=E4=BA=86=E6=9C=89?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E6=B2=A1=E4=BF=9D=E5=AD=98=EF=BC=8C=E6=89=80?= =?UTF-8?q?=E4=BB=A5=E8=B7=B3=E5=87=BA=E4=BF=9D=E5=AD=98=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=20=201.=20=E4=BF=9D=E5=AD=98=E5=BC=B9=E7=AA=97=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E9=80=89=E6=8B=A9=E5=85=B3=E9=97=AD=E6=88=96=E5=8F=96?= =?UTF-8?q?=E6=B6=88=EF=BC=8C=E8=A7=86=E4=B8=BA"=E6=95=B4=E4=BD=93?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E7=BB=93=E6=9E=9C"=E7=9A=84=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=20=202.=20=E5=8F=AA=E8=A6=81=E5=9C=A8=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E5=BC=B9=E7=AA=97=E4=B8=AD=E9=80=89=E6=8B=A9=E4=BA=86?= =?UTF-8?q?=E7=A1=AE=E5=AE=9A=EF=BC=8C=E4=B8=8D=E7=AE=A1=E5=90=8E=E9=9D=A2?= =?UTF-8?q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8?q?=E7=A1=AE=E5=AE=9A=E7=BB=9F=E4=B8=80=E9=80=BB=E8=BE=91=E4=B8=BA?= =?UTF-8?q?=EF=BC=8C=E5=BD=93=E5=87=BA=E7=8E=B0=E4=BB=BB=E4=B8=80=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E4=BF=9D=E5=AD=98=E5=A4=B1=E8=B4=A5=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E8=A7=86=E4=B8=BA"=E6=95=B4=E4=BD=93=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E7=BB=93=E6=9E=9C"=E7=9A=84=E5=A4=B1=E8=B4=A5=EF=BC=8C?= =?UTF-8?q?=E4=B8=94=E4=BF=9D=E5=AD=98=E5=A4=B1=E8=B4=A5=E7=9A=84=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E4=B8=8D=E4=BC=9A=E5=BD=B1=E5=93=8D=E6=AD=A3=E5=B8=B8?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E7=9A=84=E4=BF=9D=E5=AD=98=20=E3=80=90review?= =?UTF-8?q?=E5=BB=BA=E8=AE=AE=E3=80=91=E6=97=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/file/SaveSomeTemplatePane.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/file/SaveSomeTemplatePane.java b/designer-base/src/main/java/com/fr/design/file/SaveSomeTemplatePane.java index af2d1d2a12..6192649aba 100644 --- a/designer-base/src/main/java/com/fr/design/file/SaveSomeTemplatePane.java +++ b/designer-base/src/main/java/com/fr/design/file/SaveSomeTemplatePane.java @@ -56,12 +56,13 @@ public class SaveSomeTemplatePane extends BasicPane { this.dialog = this.showSmallWindow(parent, new DialogActionAdapter() { @Override public void doOk() { + isAllSaved = true; for (int i = 0; i < templateCheckBoxes.length; i++) { if (templateCheckBoxes[i].isSelected()) { - saveSelectedTemplate(unSavedTemplate.get(i)); + // 当存在模板保存失败时,视为整体的isAllSaved失败 + isAllSaved = saveSelectedTemplate(unSavedTemplate.get(i)) && isAllSaved; } } - isAllSaved = true; } public void doCancel() { @@ -188,12 +189,13 @@ public class SaveSomeTemplatePane extends BasicPane { } - private void saveSelectedTemplate(JTemplate specifiedTemplate) { + private boolean saveSelectedTemplate(JTemplate specifiedTemplate) { if (!specifiedTemplate.isSaved()) { specifiedTemplate.stopEditing(); - specifiedTemplate.saveTemplate(); + return specifiedTemplate.saveTemplate(); } FineLoggerFactory.getLogger().info( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Template_Already_Saved", specifiedTemplate.getEditingFILE().getName())); + return true; }