Browse Source

Merge pull request #885 in DESIGN/design from ~XIAOXIA/design:release/10.0 to release/10.0

* commit '8e9457b51cd8281c758178f2a3dcc3609f5cdda9':
  rt
  REPORT-14835 交互优化
  REPORT-17014 @xiaoxia 模版版本控制插件启用时,触发模版保存。禁用插件后查看模版版本发现有版本新增
bugfix/10.0
xiaoxia 6 years ago
parent
commit
7b4d876836
  1. 2
      designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java
  2. 6
      designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/EditFileVersionDialog.java

2
designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java

@ -164,7 +164,7 @@ public class VcsHelper implements JTemplateActionListener {
*/
@Override
public void templateSaved(JTemplate<?, ?> jt) {
if (DesignerEnvManager.getEnvManager().getVcsConfigManager().isVcsEnable() && !FineClusterConfig.getInstance().isCluster()) {
if (needInit() && DesignerEnvManager.getEnvManager().getVcsConfigManager().isVcsEnable() && !FineClusterConfig.getInstance().isCluster()) {
fireVcs(jt);
}
}

6
designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/EditFileVersionDialog.java

@ -7,8 +7,11 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextarea.UITextArea;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.DesignerFrameFileDealerPane;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.report.entity.VcsEntity;
import com.fr.stable.StringUtils;
import com.fr.workspace.WorkContext;
import com.fr.workspace.server.vcs.VcsOperator;
@ -81,6 +84,9 @@ public class EditFileVersionDialog extends UIDialog {
entity.setCommitMsg(msgTestArea.getText());
WorkContext.getCurrent().get(VcsOperator.class).updateVersion(entity);
setVisible(false);
String path = DesignerFrameFileDealerPane.getInstance().getSelectedOperation().getFilePath();
FileVersionTable table = FileVersionTable.getInstance();
table.updateModel(table.getSelectedRow(), WorkContext.getCurrent().get(VcsOperator.class).getVersions(path.replaceFirst("/", StringUtils.EMPTY)));
}
});

Loading…
Cancel
Save