Browse Source

Pull request #14690: REPORT-126773 fix: 修复自定义主题修改配色预览不生效问题

Merge in DESIGN/design from ~ANNER/design:feature/x to feature/x

* commit '213181dc99a11f01a6a661e619fdb8ae624ff429':
  REPORT-126773 fix: 修复自定义主题修改配色预览不生效问题
feature/x
Anner-王敬松 3 months ago
parent
commit
553f295ea4
  1. 17
      designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java

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

@ -268,9 +268,14 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
TemplateTheme usingTheme = getTemplateTheme();
boolean isUsingThemeChanged = StringUtils.equals(event.themName, usingTheme.getName());
if (isUsingThemeChanged && (event.action == TemplateThemeConfig.ThemeConfigAction.REMOVE ||
event.action == TemplateThemeConfig.ThemeConfigAction.UPDATE)) {
if (event.action == TemplateThemeConfig.ThemeConfigAction.REMOVE ||
event.action == TemplateThemeConfig.ThemeConfigAction.UPDATE) {
if (isUsingThemeChanged) {
checkAndResetTheme();
} else {
// 修改主题配置,但是没有修改主题名称 , 需要重新保存文件
fireSuperTargetModified();
}
}
}
};
@ -470,6 +475,7 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
/**
* 用于 切换工作目录 时的模板资源暂存
*
* @return
*/
public FILE templateToStashFile4Envchange() {
@ -545,6 +551,7 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
/**
* 刷新 模板资源 EditingFILE
* 仅在切换工作目录reload模板时使用
*
* @param file
*/
public void refreshResourceAndEditingFILE(FILE file) {
@ -1785,7 +1792,6 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
}
private CallbackSaveWorker saveAs(boolean showLoc) {
FILE editingFILE = this.getEditingFILE();
if (editingFILE == null) {
@ -1975,7 +1981,6 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
}
@Override
public void saveDirectly() {
if (isSaving()) {
@ -2125,6 +2130,7 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
/**
* 获取此模板所使用的tab栏操作类型
*
* @return
*/
public String getTemplateTabOperatorType() {
@ -2133,6 +2139,7 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
/**
* 当前模板是否可以被保存
*
* @return /
*/
public boolean canBeSaved() {
@ -2150,6 +2157,7 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
/**
* 获取此模板在tab栏中显示的名称
*
* @return
*/
public String getTabShowName(JTemplate<?, ?> jTemplate) {
@ -2162,6 +2170,7 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
/**
* 切换环境之前是否需要保存
*
* @return
*/
public boolean needSaveBeforeSwitchEnv() {

Loading…
Cancel
Save