|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
import { end } from "xaop";
|
|
|
|
|
import { Entitys2Data } from "../Add-on/ExportData";
|
|
|
|
|
import { ApplicationService } from "../ApplicationServices/Application";
|
|
|
|
|
import { Hole } from "../DatabaseServices/3DSolid/Hole";
|
|
|
|
|
import { CommandHistoryRecord } from "../DatabaseServices/CommandHistoryRecord";
|
|
|
|
|
import { CreateObjectData } from "../DatabaseServices/CreateObjectData";
|
|
|
|
|
import { Entity } from "../DatabaseServices/Entity/Entity";
|
|
|
|
@ -27,7 +28,7 @@ export class SyncDataReactor
|
|
|
|
|
|
|
|
|
|
for (let e of changeObjects)
|
|
|
|
|
{
|
|
|
|
|
if (e instanceof Entity)
|
|
|
|
|
if (e instanceof Entity && !(e instanceof Hole))
|
|
|
|
|
{
|
|
|
|
|
if (e.IsErase)
|
|
|
|
|
deleteEntitys.push(e);
|
|
|
|
@ -35,7 +36,7 @@ export class SyncDataReactor
|
|
|
|
|
changeEntitys.push(e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
let createEntitys = createObjects.filter(e => e instanceof Entity) as Entity[];
|
|
|
|
|
let createEntitys = createObjects.filter(e => e instanceof Entity && !(e instanceof Hole)) as Entity[];
|
|
|
|
|
|
|
|
|
|
if (createEntitys.length > 0 || deleteEntitys.length > 0 || changeEntitys.length > 0)
|
|
|
|
|
{
|
|
|
|
@ -65,7 +66,7 @@ export class SyncDataReactor
|
|
|
|
|
createEntitys.push(h.redoData.CreateObject as Entity);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (!(h.Object instanceof Entity))
|
|
|
|
|
if (!(h.Object instanceof Entity) || h.Object instanceof Hole)
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
let e = h.Object;
|
|
|
|
@ -111,11 +112,11 @@ export class SyncDataReactor
|
|
|
|
|
{
|
|
|
|
|
if (h.undoData instanceof RemoveObjectData)
|
|
|
|
|
deleteEntitys.push(h.undoData.RemoveObject as Entity);
|
|
|
|
|
else if (h.undoData instanceof CreateObjectData)
|
|
|
|
|
else if (h.undoData instanceof CreateObjectData && !(h.undoData.CreateObject instanceof Hole))
|
|
|
|
|
createEntitys.push(h.undoData.CreateObject as Entity);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (!(h.Object instanceof Entity))
|
|
|
|
|
if (!(h.Object instanceof Entity) || h.Object instanceof Hole)
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
let e = h.Object;
|
|
|
|
|