diff --git a/src/Editor/SelectSet.ts b/src/Editor/SelectSet.ts index 5ac055887..f0f3cebe8 100644 --- a/src/Editor/SelectSet.ts +++ b/src/Editor/SelectSet.ts @@ -1,6 +1,6 @@ import * as THREE from 'three'; import { arrayRemoveOnce } from '../Common/ArrayExt'; -import { GetEntity, IsEntity } from '../Common/Utils'; +import { GetEntity, IsEntity, log } from '../Common/Utils'; import { Entity } from '../DatabaseServices/Entity'; import { SelectSetBase } from './SelectBase'; import { CheckFilter, Filter } from './SelectFilter'; @@ -22,8 +22,13 @@ export class SelectSet AddSelect(selectData: SelectSetBase) { + let selectCount = selectData.m_SelectList.length; //1.校验重复 selectData.m_SelectList = selectData.m_SelectList.filter(obj => !this.m_IdSelect.has(obj.id)) + + let dupCount = selectCount - selectData.m_SelectList.length; + log(`选择${selectCount}个,重复${dupCount}个.`); + //加入集合 this.m_SelectSetList.push(selectData); @@ -34,6 +39,7 @@ export class SelectSet } RemoveSelect(selectData: SelectSetBase) { + log(`取消选择${selectData.m_SelectList.length}个.`); for (let obj of selectData.m_SelectList) { if (this.m_IdSelect.has(obj.id))