From 81fb909d0ad51d4725766721c55805c524c38f8c Mon Sep 17 00:00:00 2001 From: Anner Date: Thu, 22 Aug 2024 09:51:05 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-126959=20fix:=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E4=B8=BB=E9=A2=98=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E9=85=8D=E8=89=B2=E9=A2=84=E8=A7=88=E4=B8=8D=E7=94=9F=E6=95=88?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/mainframe/JTemplate.java | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java index a315b0e83c..6871987599 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java +++ b/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.file.FILE; import com.fr.file.FILEChooserPane; -import com.fr.file.FileFILE; import com.fr.file.MemFILE; import com.fr.file.StashedFILE; 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.PluginEventType; 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.cellattr.CellImage; -import com.fr.report.lock.LockInfoOperator; import com.fr.stable.ArrayUtils; import com.fr.stable.Filter; import com.fr.stable.StringUtils; import com.fr.stable.core.UUID; import com.fr.widgettheme.designer.WidgetThemeDisplayAction; import com.fr.workspace.WorkContext; -import com.fr.workspace.base.UserInfo; import com.fr.workspace.server.lock.TplOperator; import com.fr.workspace.server.repository.template.TemplateRepository; @@ -266,9 +260,14 @@ public abstract class JTemplate> TemplateTheme usingTheme = getTemplateTheme(); boolean isUsingThemeChanged = StringUtils.equals(event.themName, usingTheme.getName()); - if (isUsingThemeChanged && (event.action == TemplateThemeConfig.ThemeConfigAction.REMOVE || - event.action == TemplateThemeConfig.ThemeConfigAction.UPDATE)) { - checkAndResetTheme(); + if (event.action == TemplateThemeConfig.ThemeConfigAction.REMOVE || + event.action == TemplateThemeConfig.ThemeConfigAction.UPDATE) { + if (isUsingThemeChanged) { + checkAndResetTheme(); + } else { + // 修改主题配置,但是没有修改主题名称 , 需要重新保存文件 + fireSuperTargetModified(); + } } } };