Browse Source

Pull request #9084: REPORT-70481 远程设计切换校验机制优化

Merge in DESIGN/design from ~YVAN/design:feature/x to feature/x

* commit '760231679b996894242588336d1948b948bdb5c8':
  REPORT-70481 远程设计切换校验机制优化 【问题原因】产品修改设计 【改动思路】切换工作目录时跳出的保存弹窗,在用户取消保存后,中断切换工作目录动作 【review建议】无
feature/x
Yvan 2 years ago
parent
commit
0024a4a31d
  1. 7
      designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java
  2. 6
      designer-base/src/main/java/com/fr/design/actions/file/SwitchExistEnv.java

7
designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java

@ -83,8 +83,6 @@ public class EnvChangeEntrance {
private boolean envListOkAction(EnvListPane envListPane, PopTipStrategy strategy) {
final String selectedName = envListPane.updateEnvManager();
SaveSomeTemplatePane saveSomeTemplatePane = new SaveSomeTemplatePane(true, SwingUtilities.getWindowAncestor(envListPane));
saveSomeTemplatePane.showSavePane();
return switch2Env(selectedName, strategy);
}
@ -391,6 +389,11 @@ public class EnvChangeEntrance {
@Override
public void doOk() {
SaveSomeTemplatePane saveSomeTemplatePane = new SaveSomeTemplatePane(true, SwingUtilities.getWindowAncestor(envListPane));
if (!saveSomeTemplatePane.showSavePane()) {
// 用户取消保存时,取消切换目录操作
return;
}
boolean changeResult = envListOkAction(envListPane, PopTipStrategy.LATER);
// 切换完成后清理密码
updateNotRememberPwdEnv();

6
designer-base/src/main/java/com/fr/design/actions/file/SwitchExistEnv.java

@ -68,8 +68,10 @@ public class SwitchExistEnv extends MenuDef {
EnvChangeEntrance.getInstance().chooseEnv(envName);
} else {
SaveSomeTemplatePane saveSomeTemplatePane = new SaveSomeTemplatePane(true);
saveSomeTemplatePane.showSavePane();
EnvChangeEntrance.getInstance().switch2Env(envName);
if (saveSomeTemplatePane.showSavePane()) {
// 用户模板保存后,才进行切换目录操作
EnvChangeEntrance.getInstance().switch2Env(envName);
}
}
}

Loading…
Cancel
Save