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 4e0a8090e..8bb23786f 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 @@ -625,8 +625,6 @@ public abstract class JTemplate> */ public void redo() { this.getUndoManager().redo(); - // 重做前模版使用主题可能已经被删除或修改,需要重置模版样式 - checkAndResetTheme(); fireSuperTargetModified(); } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/JForm.java b/designer-form/src/main/java/com/fr/design/mainframe/JForm.java index 04dd92243..9d03edbc0 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/JForm.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/JForm.java @@ -664,9 +664,11 @@ public class JForm extends JTemplate implements BaseJForm implements BaseJForm implements BaseJForm { @Override protected void applyUndoState(WorkBookUndoState u) { try { - this.setTarget((WorkBook) u.getWorkBook().clone()); + WorkBook undoWorkBook = (WorkBook) u.getWorkBook().clone(); + undoWorkBook.checkAndResetTheme(); + this.setTarget(undoWorkBook); if (!DesignerMode.isAuthorityEditing()) { if (u.getAuthorityType() != BaseUndoState.NORMAL_STATE) { applyAll(u);