GeomAPI_AISObject::~GeomAPI_AISObject()
{
- if (myImpl) {
+ if (!empty()) {
// This is necessary for correct deletion of Handle entity.
// Without this Handle does not decremented counter to 0
- Handle(AIS_InteractiveObject) *anAIS = (Handle(AIS_InteractiveObject)*)myImpl;
+ Handle(AIS_InteractiveObject) *anAIS = implPtr<Handle(AIS_InteractiveObject)>();
anAIS->Nullify();
}
}
if (anAIS.IsNull())
return;
Quantity_Color aColor((Quantity_NameOfColor) theColor);
- anAIS->SetColor(aColor);
Handle(AIS_Dimension) aDimAIS = Handle(AIS_Dimension)::DownCast(anAIS);
if (!aDimAIS.IsNull()) {
aDimAIS->DimensionAspect()->SetCommonColor(aColor);
if (aColor.IsEqual(aCurrentColor))
return false;
- anAIS->SetColor(aColor);
Handle(AIS_Dimension) aDimAIS = Handle(AIS_Dimension)::DownCast(anAIS);
if (!aDimAIS.IsNull()) {
aDimAIS->DimensionAspect()->SetCommonColor(aColor);