Browse Source

REPORT-16527

@xiaoxia 通过直接预览触发的模版保存,该模版不会保存新版本
bugfix/10.0
XiaXiang 6 years ago
parent
commit
7186d89bb2
  1. 3
      designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java
  2. 7
      designer-realize/src/main/java/com/fr/start/Designer.java

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

@ -687,7 +687,10 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
this.saved = true; this.saved = true;
this.authoritySaved = true; this.authoritySaved = true;
DesignerContext.getDesignerFrame().setTitle(); DesignerContext.getDesignerFrame().setTitle();
if (DesignerEnvManager.getEnvManager().getVcsConfigManager().isVcsEnable()) {
VcsHelper.dealWithVcs(this);
}
this.fireJTemplateSaved(); this.fireJTemplateSaved();
return true; return true;
} }

7
designer-realize/src/main/java/com/fr/start/Designer.java

@ -30,7 +30,6 @@ import com.fr.design.mainframe.alphafine.component.AlphaFinePane;
import com.fr.design.mainframe.bbs.UserInfoLabel; import com.fr.design.mainframe.bbs.UserInfoLabel;
import com.fr.design.mainframe.bbs.UserInfoPane; import com.fr.design.mainframe.bbs.UserInfoPane;
import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus; 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.KeySetUtils;
import com.fr.design.menu.MenuDef; import com.fr.design.menu.MenuDef;
import com.fr.design.menu.SeparatorDef; import com.fr.design.menu.SeparatorDef;
@ -221,9 +220,6 @@ public class Designer extends BaseDesigner {
jt.stopEditing(); jt.stopEditing();
jt.saveTemplate(); jt.saveTemplate();
jt.requestFocus(); jt.requestFocus();
if (DesignerEnvManager.getEnvManager().getVcsConfigManager().isVcsEnable()) {
VcsHelper.dealWithVcs(jt);
}
} }
}); });
return saveButton; return saveButton;
@ -281,9 +277,6 @@ public class Designer extends BaseDesigner {
if (jt == null) { if (jt == null) {
return; return;
} }
if (DesignerEnvManager.getEnvManager().getVcsConfigManager().isVcsEnable() && saveButton.isEnabled()) {
VcsHelper.dealWithVcs(jt);
}
WebPreviewUtils.preview(jt); WebPreviewUtils.preview(jt);
} }

Loading…
Cancel
Save