Browse Source

Pull request #2926: REPORT-43754 【二轮冒烟】远程新建目录重复的名字不会提醒

Merge in DESIGN/design from ~YVAN/design:final/10.0 to final/10.0

* commit 'af888e6255ea8246c570af9c835b5bc03828e7f9':
  REPORT-43754 【二轮冒烟】远程新建目录重复的名字不会提醒 【问题原因】在Listener中判断重复的逻辑有点问题,它会把用户修改了某一项名字后,点击的另一项的名字置为空,然后再遍历allListNames,看是否有重复的名字,例如,aa、bb、cc的列表中,用户将aa修改为bb,然后点击bb,这时候bb被置为空,再将aa、""、cc与bb比较,发现没有重复,即不会显示命名重复弹窗 【改动方案】把重命名后,allListNames中选中项的名字置为空的逻辑,修改为,重命名后,allListNames中重命名项的名字置为空。即修改aa为bb后,将bb与""、bb、cc比较,判断有重复,然后给出命名重复提示
final/10.0
Kara 4 years ago
parent
commit
864f9fc780
  1. 2
      designer-base/src/main/java/com/fr/env/EnvListPane.java

2
designer-base/src/main/java/com/fr/env/EnvListPane.java vendored

@ -34,7 +34,7 @@ public class EnvListPane extends JListControlPane {
public void propertyChange() { public void propertyChange() {
String tempName = getEditingName(); String tempName = getEditingName();
String[] allListNames = nameableList.getAllNames(); String[] allListNames = nameableList.getAllNames();
allListNames[nameableList.getSelectedIndex()] = StringUtils.EMPTY; allListNames[editingIndex] = StringUtils.EMPTY;
if (StringUtils.isEmpty(tempName)) { if (StringUtils.isEmpty(tempName)) {
nameableList.stopEditing(); nameableList.stopEditing();
FineJOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(EnvListPane.this), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Workspace_Empty_Name_Warn_Text")); FineJOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(EnvListPane.this), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Workspace_Empty_Name_Warn_Text"));

Loading…
Cancel
Save