0026076: Visualization - empty bounding box of a shape after closing local context

Fixed handling of invalid bounding boxes;
Links related to temporary objects are now removed from selection structures;
Test case for issue #26076
This commit is contained in:
vpa
2015-04-17 20:12:29 +03:00
committed by bugmaster
parent 2afd4e9888
commit b3c433fea3
6 changed files with 62 additions and 5 deletions
@@ -72,6 +72,9 @@ Select3D_BndBox3d SelectMgr_SelectableObjectSet::Box (const Standard_Integer the
const Handle(SelectMgr_SelectableObject)& anObject = GetObjectById (theIndex);
Bnd_Box aBox;
anObject->BoundingBox (aBox);
if (aBox.IsVoid())
return Select3D_BndBox3d();
return Select3D_BndBox3d (SelectMgr_Vec3 (aBox.CornerMin().X(), aBox.CornerMin().Y(), aBox.CornerMin().Z()),
SelectMgr_Vec3 (aBox.CornerMax().X(), aBox.CornerMax().Y(), aBox.CornerMax().Z()));
}
@@ -273,9 +273,6 @@ void SelectMgr_SelectionManager::Remove (const Handle(SelectMgr_SelectableObject
break;
}
}
theSelector->RemoveSelectionOfObject (theObject, theObject->CurrentSelection());
theSelector->RemoveSelectableObject (theObject);
theObject->CurrentSelection()->UpdateBVHStatus (SelectMgr_TBU_Remove);
if (aSelectors.IsEmpty())
{