Browse Source

Merge pull request #14695 in DESIGN/design from fbp/release to fbp/feature

* commit '6bfd7d55fe289432bcfae7746c11ec12421b019d':
  REPORT-126959 fix: 修复自定义主题修改配色预览不生效问题
fbp/feature
superman 3 months ago
parent
commit
c86706ac70
  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

@ -71,7 +71,6 @@ import com.fr.design.write.submit.DBManipulationPane;
import com.fr.event.EventDispatcher; import com.fr.event.EventDispatcher;
import com.fr.file.FILE; import com.fr.file.FILE;
import com.fr.file.FILEChooserPane; import com.fr.file.FILEChooserPane;
import com.fr.file.FileFILE;
import com.fr.file.MemFILE; import com.fr.file.MemFILE;
import com.fr.file.StashedFILE; import com.fr.file.StashedFILE;
import com.fr.form.ui.NoneWidget; import com.fr.form.ui.NoneWidget;
@ -92,19 +91,14 @@ import com.fr.plugin.observer.PluginEvent;
import com.fr.plugin.observer.PluginEventListener; import com.fr.plugin.observer.PluginEventListener;
import com.fr.plugin.observer.PluginEventType; import com.fr.plugin.observer.PluginEventType;
import com.fr.plugin.observer.PluginListenerRegistration; import com.fr.plugin.observer.PluginListenerRegistration;
import com.fr.report.InconsistentLockException;
import com.fr.report.LockedException;
import com.fr.report.UnLockedException;
import com.fr.report.cell.Elem; import com.fr.report.cell.Elem;
import com.fr.report.cell.cellattr.CellImage; import com.fr.report.cell.cellattr.CellImage;
import com.fr.report.lock.LockInfoOperator;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.Filter; import com.fr.stable.Filter;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.stable.core.UUID; import com.fr.stable.core.UUID;
import com.fr.widgettheme.designer.WidgetThemeDisplayAction; import com.fr.widgettheme.designer.WidgetThemeDisplayAction;
import com.fr.workspace.WorkContext; import com.fr.workspace.WorkContext;
import com.fr.workspace.base.UserInfo;
import com.fr.workspace.server.lock.TplOperator; import com.fr.workspace.server.lock.TplOperator;
import com.fr.workspace.server.repository.template.TemplateRepository; import com.fr.workspace.server.repository.template.TemplateRepository;
@ -266,9 +260,14 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
TemplateTheme usingTheme = getTemplateTheme(); TemplateTheme usingTheme = getTemplateTheme();
boolean isUsingThemeChanged = StringUtils.equals(event.themName, usingTheme.getName()); boolean isUsingThemeChanged = StringUtils.equals(event.themName, usingTheme.getName());
if (isUsingThemeChanged && (event.action == TemplateThemeConfig.ThemeConfigAction.REMOVE || if (event.action == TemplateThemeConfig.ThemeConfigAction.REMOVE ||
event.action == TemplateThemeConfig.ThemeConfigAction.UPDATE)) { event.action == TemplateThemeConfig.ThemeConfigAction.UPDATE) {
checkAndResetTheme(); if (isUsingThemeChanged) {
checkAndResetTheme();
} else {
// 修改主题配置,但是没有修改主题名称 , 需要重新保存文件
fireSuperTargetModified();
}
} }
} }
}; };

Loading…
Cancel
Save