|
|
|
@ -57,12 +57,14 @@ export class SelectSetBase
|
|
|
|
|
SelectGroup(filter?: Filter): number
|
|
|
|
|
{
|
|
|
|
|
let groupCount = 0;
|
|
|
|
|
let curEnt: Entity;
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
for (let selEnt of this.SelectEntityList)
|
|
|
|
|
{
|
|
|
|
|
if (selEnt.GroupId?.Object)
|
|
|
|
|
{
|
|
|
|
|
curEnt = selEnt;
|
|
|
|
|
let group = selEnt.GroupId.Object as GroupRecord;
|
|
|
|
|
for (let entId of group.Entitys)
|
|
|
|
|
{
|
|
|
|
@ -80,7 +82,11 @@ export class SelectSetBase
|
|
|
|
|
}
|
|
|
|
|
catch (error)
|
|
|
|
|
{
|
|
|
|
|
ReportError(error.stack, `命令标识:${commandMachine.LastCmd}`);
|
|
|
|
|
//自动修复错误的图纸
|
|
|
|
|
if (curEnt && !(curEnt.GroupId?.Object instanceof GroupRecord))
|
|
|
|
|
curEnt.GroupId = undefined;
|
|
|
|
|
|
|
|
|
|
ReportError(error.stack, `选择编组失败`);
|
|
|
|
|
}
|
|
|
|
|
return groupCount;
|
|
|
|
|
}
|
|
|
|
|