Browse Source

REPORT-92953 设计器修改默认工程名称后无法启动

new-design
Destiny.Lin 2 years ago
parent
commit
cafb3d2130
  1. 4
      designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java
  2. 3
      designer-base/src/main/java/com/fr/design/gui/ilist/JNameEdList.java

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

@ -116,6 +116,10 @@ public class EnvChangeEntrance {
if (!checkValid) {
return false;
}
//如果是相同环境就不会做done操作,因此不会更新名字,需要先判断一下,如果是相同环境也要更新一下名字(可能会重命名)
if (AssistUtils.equals(WorkContext.getCurrent(), workspace)) {
DesignerEnvManager.getEnvManager().setCurEnvName(envName);
}
WorkContext.switchTo(workspace, new WorkContextCallback() {
@Override

3
designer-base/src/main/java/com/fr/design/gui/ilist/JNameEdList.java

@ -175,7 +175,8 @@ public class JNameEdList extends UIList implements CellEditorListener {
}
public void setIllegalIndex(int index) {
setNameAt(NameInspector.ILLEGAL_NAME_HOLDER, index);
//环境如果重名会被命名为请重命名,这个”请重命名“也会重复,后面加个索引区别一下
setNameAt(NameInspector.ILLEGAL_NAME_HOLDER + index, index);
this.repaint();
}

Loading…
Cancel
Save