Browse Source

REPORT-70481 远程设计切换校验机制优化

【问题原因】产品修改设计
【改动思路】切换工作目录时跳出的保存弹窗,在用户取消保存后,中断切换工作目录动作
【review建议】无
feature/x
Yvan 3 years ago
parent
commit
3ad0c98960
  1. 7
      designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java
  2. 4
      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) { private boolean envListOkAction(EnvListPane envListPane, PopTipStrategy strategy) {
final String selectedName = envListPane.updateEnvManager(); final String selectedName = envListPane.updateEnvManager();
SaveSomeTemplatePane saveSomeTemplatePane = new SaveSomeTemplatePane(true, SwingUtilities.getWindowAncestor(envListPane));
saveSomeTemplatePane.showSavePane();
return switch2Env(selectedName, strategy); return switch2Env(selectedName, strategy);
} }
@ -391,6 +389,11 @@ public class EnvChangeEntrance {
@Override @Override
public void doOk() { public void doOk() {
SaveSomeTemplatePane saveSomeTemplatePane = new SaveSomeTemplatePane(true, SwingUtilities.getWindowAncestor(envListPane));
if (!saveSomeTemplatePane.showSavePane()) {
// 用户取消保存时,取消切换目录操作
return;
}
boolean changeResult = envListOkAction(envListPane, PopTipStrategy.LATER); boolean changeResult = envListOkAction(envListPane, PopTipStrategy.LATER);
// 切换完成后清理密码 // 切换完成后清理密码
updateNotRememberPwdEnv(); updateNotRememberPwdEnv();

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

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

Loading…
Cancel
Save