#include <SelectMgr_SensitiveEntitySet.hxx>
+#include <Graphic3d_TransformPers.hxx>
#include <Select3D_SensitiveEntity.hxx>
#include <SelectMgr_SensitiveEntity.hxx>
{
addOwner (theEntity->BaseSensitive()->OwnerId());
}
+ if (!theEntity->BaseSensitive()->TransformPersistence().IsNull())
+ {
+ myHasEntityWithPersistence = Standard_True;
+ }
MarkDirty();
}
{
for (NCollection_Vector<Handle(SelectMgr_SensitiveEntity)>::Iterator aSelEntIter (theSelection->Entities()); aSelEntIter.More(); aSelEntIter.Next())
{
- if (!aSelEntIter.Value()->BaseSensitive()->IsKind (STANDARD_TYPE(Select3D_SensitiveEntity)))
+ const Handle(SelectMgr_SensitiveEntity)& aSensEnt = aSelEntIter.Value();
+ if (!aSensEnt->BaseSensitive()->IsKind (STANDARD_TYPE(Select3D_SensitiveEntity)))
{
- aSelEntIter.Value()->ResetSelectionActiveStatus();
+ aSensEnt->ResetSelectionActiveStatus();
continue;
}
const Standard_Integer anExtent = mySensitives.Extent();
- if (mySensitives.Add (aSelEntIter.Value()) > anExtent)
+ if (mySensitives.Add (aSensEnt) > anExtent)
+ {
+ addOwner (aSensEnt->BaseSensitive()->OwnerId());
+ }
+ if (!aSensEnt->BaseSensitive()->TransformPersistence().IsNull())
{
- addOwner (aSelEntIter.Value()->BaseSensitive()->OwnerId());
+ myHasEntityWithPersistence = Standard_True;
}
}
MarkDirty();
//=======================================================================
Select3D_BndBox3d SelectMgr_SensitiveEntitySet::Box (const Standard_Integer theIndex) const
{
- return GetSensitiveById (theIndex)->BaseSensitive()->BoundingBox();
+ const Handle(Select3D_SensitiveEntity)& aSensitive = GetSensitiveById (theIndex)->BaseSensitive();
+ if (!aSensitive->TransformPersistence().IsNull())
+ {
+ return Select3D_BndBox3d();
+ }
+
+ return aSensitive->BoundingBox();
}
//=======================================================================