From d22b67acf03b7e835e3370b07a5f0a0acff043f4 Mon Sep 17 00:00:00 2001 From: kerry Date: Fri, 10 Sep 2021 18:04:26 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-59010=E3=80=90=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E3=80=91=E4=B8=BB=E9=A2=98=E9=85=8D=E8=89=B2?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=8C=E7=BB=86=E8=8A=82=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E7=9A=84=E6=B8=90=E5=8F=98=E8=89=B2=E6=B2=A1=E6=9C=89=E6=94=B9?= =?UTF-8?q?=E5=8F=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/theme/TemplateThemeProfilePane.java | 7 +++---- .../java/com/fr/design/style/color/ColorSelectDialog.java | 5 ++++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java index 9f8841f02..01a13ea98 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java @@ -1,11 +1,11 @@ package com.fr.design.mainframe.theme; +import com.fr.base.theme.FineColorFlushUtils; import com.fr.base.theme.FineColorManager; import com.fr.base.theme.TemplateTheme; import com.fr.base.theme.TemplateThemeConfig; import com.fr.base.theme.settings.ThemeThumbnail; import com.fr.base.theme.settings.ThemedCellStyleList; -import com.fr.base.theme.settings.ThemedChartStyle; import com.fr.base.theme.settings.ThemedColorScheme; import com.fr.design.designer.IntervalConstants; import com.fr.design.dialog.FineJOptionPane; @@ -31,9 +31,6 @@ import com.fr.general.Inter; import com.fr.log.FineLoggerFactory; import com.fr.stable.StringUtils; import com.fr.transaction.CallBackAdaptor; -import com.fr.transaction.Configurations; -import com.fr.transaction.WorkerFacade; - import javax.swing.BorderFactory; import javax.swing.JComponent; import javax.swing.JDialog; @@ -317,12 +314,14 @@ public abstract class TemplateThemeProfilePane extends FineColorManager.FineColorReplaceByColorScheme replaceByColorScheme = new FineColorManager.FineColorReplaceByColorScheme(colors); T theme = updateBean(); + FineColorFlushUtils.replaceCacheObject(theme, replaceByColorScheme); FineColorManager.traverse(theme, replaceByColorScheme); populateBean4CustomEditors(theme); //图表渐变色 chartStyleSettingPane.populateGradientBar(colors); themePreviewPane.refresh(theme); + this.repaint(); } public void populateBean(T theme) { diff --git a/designer-base/src/main/java/com/fr/design/style/color/ColorSelectDialog.java b/designer-base/src/main/java/com/fr/design/style/color/ColorSelectDialog.java index 56bc9aa65..23dcf8cc3 100644 --- a/designer-base/src/main/java/com/fr/design/style/color/ColorSelectDialog.java +++ b/designer-base/src/main/java/com/fr/design/style/color/ColorSelectDialog.java @@ -1,6 +1,7 @@ package com.fr.design.style.color; import com.fr.base.chart.BaseChartCollection; +import com.fr.design.DesignerEnvManager; import com.fr.design.gui.chart.MiddleChartDialog; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.utils.gui.GUICoreUtils; @@ -101,7 +102,9 @@ public class ColorSelectDialog extends MiddleChartDialog{ ok.setActionCommand("OK"); ok.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - seletePane.setColor(okListener.getColor()); + Color color = okListener.getColor(); + seletePane.setColor(color); + DesignerEnvManager.getEnvManager().getColorConfigManager().addToColorQueue(color); doOK(); } });