Browse Source

REPORT-57974 【主题切换】新建模板时,没按照设置的模板主题来

【问题原因】
补充新建模版后根据主题修改数据模型的逻辑

【改动思路】
同上
research/11.0
Starryi 3 years ago
parent
commit
2d490cacb6
  1. 2
      designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java
  2. 7
      designer-form/src/main/java/com/fr/design/mainframe/JForm.java
  3. 7
      designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java

2
designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java

@ -1713,7 +1713,7 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
return runtimeId;
}
private void setUpTheme4NewTemplate() {
protected void setUpTheme4NewTemplate() {
TemplateTheme theme = getUsingTemplateThemeConfig().cachedFetchTheme4NewTemplate();
TemplateThemeAttrMark themeAttrMark = template.getAttrMark(TemplateThemeAttrMark.XML_TAG);
if (themeAttrMark == null) {

7
designer-form/src/main/java/com/fr/design/mainframe/JForm.java

@ -140,7 +140,6 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm<F
public JForm() {
super(new Form(new WBorderLayout("form")), "Form");
// setTemplateTheme(getUsingTemplateThemeConfig().getDefaultTheme4NewTemplate());
}
public JForm(Form form, FILE file, Parameter[] parameters) {
@ -1168,6 +1167,12 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm<F
}
}
@Override
protected void setUpTheme4NewTemplate() {
super.setUpTheme4NewTemplate();
getTarget().setTemplateTheme(getTarget().getTemplateTheme());
}
@Override
public TemplateThemeConfig<? extends TemplateTheme> getUsingTemplateThemeConfig() {
return getTarget().getUsingTemplateThemeConfig();

7
designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java

@ -1269,6 +1269,13 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
}
}
@Override
protected void setUpTheme4NewTemplate() {
super.setUpTheme4NewTemplate();
getTarget().setTemplateTheme(getTarget().getTemplateTheme());
}
@Override
public TemplateThemeConfig<? extends TemplateTheme> getUsingTemplateThemeConfig() {
return getTarget().getUsingTemplateThemeConfig();

Loading…
Cancel
Save