Browse Source

'添加名称容错处理'

zhangyu 4 years ago
parent
commit
2f0ff608a4
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/components/mapClass/EditScence.ts

+ 2 - 0
src/components/mapClass/EditScence.ts

@@ -756,6 +756,8 @@ export class EditScence extends SGraphScene {
                 let arr = item.data.AttachObjectIds;
                 if (arr && arr.length && arr[arr.length - 1].name && flag) {
                     let name = item.name;
+                    let nameArr = name.split("\n");
+                    if (nameArr[nameArr.length - 1] != arr[arr.length - 1].name)
                     if (name) {
                         item.name = name + `\n${arr[arr.length - 1].name}`;
                         item.text = name + `\n${arr[arr.length - 1].name}`;