修复:模块替换时上层空间没有定位导致的位置错误

pull/872/head
ChenX 5 years ago
parent c7139e0735
commit 0f42e4433e

@ -472,7 +472,7 @@ export class TemplateRecord extends SymbolTableRecord
if (this.Parent && !this.Parent.IsErase)
{
let parent = this.Parent.Object as TemplateRecord;
if (parent.SplitType !== TemplateSplitType.None)
if (parent.SplitType !== TemplateSplitType.None || this.NeedUpdateParent)
return await parent.UpdateTemplateTree();
}
@ -638,6 +638,19 @@ export class TemplateRecord extends SymbolTableRecord
return new Matrix4();
}
get NeedUpdateParent(): boolean
{
if (this._Positioning) return false; //存在自我定位时,不需要更新父层
if (this.Parent)
{
let template = this.Parent.Object as TemplateRecord;
return template._CacheSpaceCS === undefined; //父层已更新时,不需要更新父层
}
return false; //没有父层时,不需要更新父层
}
protected get PositioningSupportBoards(): Board[]
{
let brs: Board[] = [];

Loading…
Cancel
Save