From 2a967d27f26c8a2371e01b0a2a065e618de2a17e Mon Sep 17 00:00:00 2001 From: shine Date: Sun, 26 Sep 2021 14:07:46 +0800 Subject: [PATCH 1/4] =?UTF-8?q?CHART-20411=20=E9=80=82=E9=85=8D=E5=A4=A7?= =?UTF-8?q?=E5=B1=8F=E6=A8=A1=E6=9D=BF=E5=8F=A6=E5=AD=98=E4=B8=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/mainframe/JTemplate.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java index d4931763c..72824b2ea 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java @@ -1460,7 +1460,7 @@ public abstract class JTemplate> if (editingFILE == null || editingFILE instanceof MemFILE) { return false; } - this.getTarget().export(TemplateResourceManager.getResource().saveTemplate(editingFILE)); + export(); this.editingFILE = editingFILE; return true; } From ac01b5c6fea6d8e88a64ae9c780b1a439c4d2b52 Mon Sep 17 00:00:00 2001 From: shine Date: Sun, 26 Sep 2021 14:08:26 +0800 Subject: [PATCH 2/4] =?UTF-8?q?CHART-20411=20=E9=80=82=E9=85=8D=E5=A4=A7?= =?UTF-8?q?=E5=B1=8F=E6=A8=A1=E6=9D=BF=E5=85=B3=E9=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/file/MutilTempalteTabPane.java | 3 ++- .../java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java b/designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java index 87b7f2f25..047420294 100644 --- a/designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java +++ b/designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java @@ -4,6 +4,7 @@ package com.fr.design.file; import com.fr.base.BaseUtils; import com.fr.base.GraphHelper; import com.fr.base.vcs.DesignerMode; +import com.fr.design.base.mode.DesignModeContext; import com.fr.design.constants.UIConstants; import com.fr.design.dialog.FineJOptionPane; import com.fr.design.gui.imenu.UIMenuItem; @@ -753,7 +754,7 @@ public class MutilTempalteTabPane extends JComponent { /** * 关闭掉一个模板之后激活新的待显示模板 */ - private void activePrevTemplateAfterClose() { + public void activePrevTemplateAfterClose() { if (openedTemplate.isEmpty()) { //新建并激活模板 DesignerContext.getDesignerFrame().addAndActivateJTemplate(); 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 866c2fabe..cfc4483c9 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 @@ -408,7 +408,9 @@ public abstract class ToolBarMenuDock { menuDef.addShortCut(new OpenRecentReportMenuDef()); - addCloseCurrentTemplateAction(menuDef); + if (!DesignModeContext.isDuchampMode()) { + addCloseCurrentTemplateAction(menuDef); + } scs = plus.shortcut4FileMenu(); if (!ArrayUtils.isEmpty(scs)) { From 291452a0f52cfe806bee77b85e80af728a6f2bad Mon Sep 17 00:00:00 2001 From: shine Date: Sun, 26 Sep 2021 19:37:38 +0800 Subject: [PATCH 3/4] =?UTF-8?q?CHART-21076=20=E6=B8=85=E6=A5=9A=E7=A3=81?= =?UTF-8?q?=E7=9B=98=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/ui/ModernUIPane.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java b/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java index 90d6accf6..09fa2bbc0 100644 --- a/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java +++ b/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java @@ -26,6 +26,7 @@ import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.io.File; import java.util.Map; /** @@ -170,6 +171,10 @@ public class ModernUIPane extends BasicPane { public void clearCache() { if (browser != null) { browser.getCacheStorage().clearCache(); + File file = new File(browser.getContext().getCacheDir()); + if (file.exists()) { + file.delete(); + } } } From 77c7a84eecde096651e1822302db51d47f79ed8e Mon Sep 17 00:00:00 2001 From: shine Date: Mon, 27 Sep 2021 09:50:29 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=92=8C=E6=8A=BD=E4=B9=8B=E5=89=8D?= =?UTF-8?q?=E5=AE=8C=E5=85=A8=E4=B8=80=E6=A0=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/mainframe/JTemplate.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java index 72824b2ea..ec0387cef 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java @@ -877,7 +877,7 @@ public abstract class JTemplate> } protected boolean export() throws Exception { - return this.getTarget().export(TemplateResourceManager.getResource().saveTemplate(editingFILE)); + return this.getTarget().export(TemplateResourceManager.getResource().saveTemplate(getEditingFILE())); }