修复:修改排版面后关联拉槽显示错误(禁止在读取文件时更新显示)

pull/1882/MERGE
ChenX 2 years ago
parent aab708361f
commit 241f104d92

@ -183,22 +183,27 @@ export class Board extends ExtrudeSolid
let arr = this.CreateArray() as any[];
arr.push(...value);
target[key] = arr;
if (key === EBoardKeyList.HighSealed)
if (!this.__ReadFileIng__ && key === EBoardKeyList.HighSealed)
this.Update(UpdateDraw.Geometry);
return true;
}
let result = Reflect.set(target, key, value, receiver);
if (key === EBoardKeyList.Lines)
this.Update(UpdateDraw.Geometry);
else if (key === EBoardKeyList.ComposingFace)
if (!this.__ReadFileIng__)//看起来使用 this.ReadFileIng 似乎也是没问题的
{
let obj = this.GetDrawObjectFromRenderType(RenderType.PlaceFace);
if (obj)
if (key === EBoardKeyList.Lines)
this.Update(UpdateDraw.Geometry);
else if (key === EBoardKeyList.ComposingFace)
{
this.UpdateDrawObject(RenderType.PlaceFace, obj);
obj.updateMatrixWorld(true);
let obj = this.CacheDrawObject.get(RenderType.PlaceFace);
if (obj)
{
this.UpdateDrawObject(RenderType.PlaceFace, obj);
obj.updateMatrixWorld(true);
}
}
}
return result;
}
return true;

@ -409,7 +409,11 @@ export class Entity extends CADObject
this.__UpdateVersion__++;
this.NeedUpdateFlag |= mode;
if (this.AutoUpdate)
{
this.DeferUpdate();
// if (this.__ReadFileIng__) //!警告
// console.error("在读取文件时更新实体的显示!");
}
}
//三维实体总是一起生成线框实体和网格实体,这个通知更新,然后统一更新就好了
@ -682,8 +686,8 @@ export class Entity extends CADObject
{
this.__ReadFileIng__ = true;
this._ReadFile(file);
this.Update();
this.__ReadFileIng__ = false;
this.Update();
}
//对象从文件中读取数据,初始化自身

Loading…
Cancel
Save