diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/FormThemeProfilePane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/FormThemeProfilePane.java index ef99423be..f34f8a27f 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/FormThemeProfilePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/FormThemeProfilePane.java @@ -59,17 +59,10 @@ public class FormThemeProfilePane extends TemplateThemeProfilePane { } @Override - public void populateBean(FormTheme theme) { - super.populateBean(theme); - - isPopulating = true; - + public void populateBean4CustomEditors(FormTheme theme) { + super.populateBean4CustomEditors(theme); formBodyStyleSettingPane.populateBean(theme.getBodyStyle()); componentStyleSettingPane.populateBean(theme.getComponentStyle()); - - themePreviewPane.refresh(theme); - - isPopulating = false; } @Override diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/ReportThemeProfilePane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/ReportThemeProfilePane.java index 5a1bff3c0..1158a8eb5 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/ReportThemeProfilePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/ReportThemeProfilePane.java @@ -35,15 +35,9 @@ public class ReportThemeProfilePane extends TemplateThemeProfilePane extends T theme = updateBean(); FineColorManager.traverse(theme, replaceByColorScheme); - populateBean(theme); - + populateBean4CustomEditors(theme); //图表渐变色 chartStyleSettingPane.populateGradientBar(colors); + + themePreviewPane.refresh(theme); } public void populateBean(T theme) { - try { - this.theme = (T) theme.clone(); - } catch (CloneNotSupportedException e) { - FineLoggerFactory.getLogger().error(e.getMessage(), e); - } + this.theme = theme; isPopulating = true; String name = theme.getName(); @@ -345,14 +342,20 @@ public abstract class TemplateThemeProfilePane extends saveAsButton.setEnabled(!currentIsNewTheme); } - cellStyleSettingPane.populateBean(theme.getCellStyleList()); colorListPane.populate(theme.getColorScheme().getColors()); colorListExtendedPane.populate(colorListPane.update()); - chartStyleSettingPane.populateBean(theme.getChartStyle()); + + populateBean4CustomEditors(theme); + themePreviewPane.refresh(theme); isPopulating = false; } + protected void populateBean4CustomEditors(T theme) { + cellStyleSettingPane.populateBean(theme.getCellStyleList()); + chartStyleSettingPane.populateBean(theme.getChartStyle()); + } + public T updateBean() { if (theme == null) { theme = config.createNewTheme();