!1013 修复:模块动态插入时的错误捕捉问题

pull/1013/MERGE
ZoeLeeFZ 4 years ago committed by ChenX
parent e5d764c5b9
commit f0d67ec872

@ -245,11 +245,11 @@ export class TemplateManage extends React.Component<{ store?: TempalteEditorStor
{ {
let newTemp = app.Database.WblockCloneObejcts([template], app.Database.TemplateTable, new Map(), DuplicateRecordCloning.Ignore)[0] as TemplateRecord; let newTemp = app.Database.WblockCloneObejcts([template], app.Database.TemplateTable, new Map(), DuplicateRecordCloning.Ignore)[0] as TemplateRecord;
let rootTemp = newTemp.Root; let rootTemp = newTemp.Root;
nens = rootTemp.AllEntitys; let ents = rootTemp.AllEntitys;
let isVsTemp = rootTemp instanceof TemplateVisualSpace; let isVsTemp = rootTemp instanceof TemplateVisualSpace;
for (let b of nens) for (let b of ents)
{ {
if (b instanceof Board) if (b instanceof Board)
{ {
@ -259,7 +259,7 @@ export class TemplateManage extends React.Component<{ store?: TempalteEditorStor
} }
} }
mtx.setPosition(ptRes.Point.sub(baseP)); mtx.setPosition(ptRes.Point.sub(baseP));
for (let e of nens) for (let e of ents)
{ {
e.AutoUpdate = false; e.AutoUpdate = false;
e.ApplyMatrix(mtx); e.ApplyMatrix(mtx);
@ -267,7 +267,7 @@ export class TemplateManage extends React.Component<{ store?: TempalteEditorStor
await newTemp.Root.UpdateTemplateTree(); await newTemp.Root.UpdateTemplateTree();
for (let e of nens) for (let e of ents)
{ {
e.AutoUpdate = true; e.AutoUpdate = true;
e.DeferUpdate(); e.DeferUpdate();

Loading…
Cancel
Save