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 e8f1b0093b..6fd7ee0079 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 @@ -543,9 +543,6 @@ public abstract class JTemplate> return false; } collectInfo(); - if (DesignerEnvManager.getEnvManager().getVcsConfigManager().isVcsEnable()) { - VcsHelper.dealWithVcs(this); - } return this.saveFile(); } diff --git a/designer-realize/src/main/java/com/fr/start/Designer.java b/designer-realize/src/main/java/com/fr/start/Designer.java index 5c81ee258b..6026ebad82 100644 --- a/designer-realize/src/main/java/com/fr/start/Designer.java +++ b/designer-realize/src/main/java/com/fr/start/Designer.java @@ -32,6 +32,7 @@ import com.fr.design.mainframe.bbs.UserInfoLabel; import com.fr.design.mainframe.bbs.UserInfoPane; import com.fr.design.mainframe.template.info.TemplateInfoCollector; import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus; +import com.fr.design.mainframe.vcs.common.VcsHelper; import com.fr.design.menu.KeySetUtils; import com.fr.design.menu.MenuDef; import com.fr.design.menu.SeparatorDef; @@ -274,6 +275,9 @@ public class Designer extends BaseDesigner { jt.stopEditing(); jt.saveTemplate(); jt.requestFocus(); + if (DesignerEnvManager.getEnvManager().getVcsConfigManager().isVcsEnable()) { + VcsHelper.dealWithVcs(jt); + } } }); return saveButton; @@ -332,6 +336,9 @@ public class Designer extends BaseDesigner { return; } WebPreviewUtils.preview(jt); + if (DesignerEnvManager.getEnvManager().getVcsConfigManager().isVcsEnable()) { + VcsHelper.dealWithVcs(jt); + } } @Override