From c093b92a20a311c981af115b5a12b6656a770e01 Mon Sep 17 00:00:00 2001 From: Starryi Date: Sat, 4 Sep 2021 21:37:51 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-58902=20=E3=80=90=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E3=80=91=E6=89=93=E5=BC=80frm=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E7=9A=84=E6=97=B6=E5=80=99=E7=BC=96=E8=BE=91cpt?= =?UTF-8?q?=E7=9A=84=E4=B8=BB=E9=A2=98=EF=BC=8C=E4=BF=9D=E5=AD=98=E5=90=8E?= =?UTF-8?q?=E5=8F=B3=E4=BE=A7=E9=9D=A2=E6=9D=BF=E6=98=BE=E7=A4=BA=E7=9A=84?= =?UTF-8?q?=E6=98=AF=E5=8D=95=E5=85=83=E6=A0=BC=E7=9A=84=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 仅当前正在编辑模版所使用的主题发生变化才需要重绘 设计器画布及属性面板等  【改动思路】 同上 --- .../java/com/fr/design/mainframe/JForm.java | 31 ++++++++++--------- .../com/fr/design/mainframe/JWorkBook.java | 11 ++++--- 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/JForm.java b/designer-form/src/main/java/com/fr/design/mainframe/JForm.java index 0d4fc318b2..784a3b690d 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/JForm.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/JForm.java @@ -39,6 +39,7 @@ import com.fr.design.designer.creator.XWParameterLayout; import com.fr.design.designer.properties.FormWidgetAuthorityEditPane; import com.fr.design.event.TargetModifiedEvent; import com.fr.design.event.TargetModifiedListener; +import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.fun.FormAdaptiveConfigUIProcessor; import com.fr.design.fun.PreviewProvider; import com.fr.design.fun.PropertyItemPaneProvider; @@ -1199,24 +1200,26 @@ public class JForm extends JTemplate implements BaseJForm { getTarget().setTemplateTheme(newTheme, compatible); - fireTargetModified(shouldCreateUndoState); - reportComposite.setSelectedIndex(reportComposite.getSelectedIndex()); - TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()).refreshDockingView(); - DesignerContext.getDesignerFrame().resetToolkitByPlus(HistoryTemplateListPane.getInstance().getCurrentEditingTemplate()); + if (HistoryTemplateListCache.getInstance().getCurrentEditingTemplate() == this) { + fireTargetModified(shouldCreateUndoState); + reportComposite.setSelectedIndex(reportComposite.getSelectedIndex()); + TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()).refreshDockingView(); + DesignerContext.getDesignerFrame().resetToolkitByPlus(HistoryTemplateListPane.getInstance().getCurrentEditingTemplate()); + } super.setTemplateTheme(newTheme, compatible); }