From 44f27680309c7365fdd5afe291fb58b9cb1d2504 Mon Sep 17 00:00:00 2001 From: Starryi Date: Tue, 31 Aug 2021 16:44:38 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-58536=20=E3=80=90=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E3=80=91=E6=96=B0=E5=BB=BAcpt=EF=BC=8C?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0sheet=E9=A1=B5=EF=BC=8C=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E9=87=8C=E4=B8=BB=E9=A2=98=E9=85=8D=E7=BD=AE=E7=9A=84?= =?UTF-8?q?=E8=83=8C=E6=99=AF=E5=8F=AA=E5=9C=A8=E7=AC=AC=E4=B8=80=E4=B8=AA?= =?UTF-8?q?sheet=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 补充新建sheet页时的主题处理逻辑,根据当前模版使用的主题重置sheet页内部的数据 【改动思路】 同上 --- .../com/fr/design/mainframe/SheetNameTabPane.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java index 7b6fbff6f..f2bf5e585 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java @@ -26,6 +26,9 @@ import com.fr.base.BaseUtils; import com.fr.base.GraphHelper; import com.fr.base.svg.IconUtils; +import com.fr.base.theme.ReportTheme; +import com.fr.base.theme.TemplateTheme; +import com.fr.base.theme.TemplateThemeCompatible; import com.fr.base.vcs.DesignerMode; import com.fr.design.actions.UpdateAction; import com.fr.design.constants.UIConstants; @@ -807,7 +810,15 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse scrollIndex++; } - reportComposite.getEditingWorkBook().addReport(insertPos, newTemplateReport()); + JTemplate template = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); + TemplateTheme theme = template.getTemplateTheme(); + + TemplateReport templateReport = newTemplateReport(); + if (theme instanceof ReportTheme) { + templateReport.onTemplateUsingThemeChange((ReportTheme) theme, TemplateThemeCompatible.NONE); + } + + reportComposite.getEditingWorkBook().addReport(insertPos, templateReport); setSelectedIndex(insertPos); // sheet名字的公式也需要做相应的变化.