X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAPI%2FGeomAPI_AISObject.cpp;h=fc34c50ae49953337cbd8279ae2a070a8b2eb488;hb=7dc85ea3929c3543703b2d8e689f8a66c0384272;hp=8c98c449c7e00649db5b8d681703c8d9b3db30bb;hpb=5e9152f6da5141e26c07727e26a0ec89255ade87;p=modules%2Fshaper.git diff --git a/src/GeomAPI/GeomAPI_AISObject.cpp b/src/GeomAPI/GeomAPI_AISObject.cpp index 8c98c449c..fc34c50ae 100644 --- a/src/GeomAPI/GeomAPI_AISObject.cpp +++ b/src/GeomAPI/GeomAPI_AISObject.cpp @@ -43,10 +43,10 @@ GeomAPI_AISObject::GeomAPI_AISObject() 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(); anAIS->Nullify(); } } @@ -272,7 +272,6 @@ void GeomAPI_AISObject::setColor(const int& theColor) 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); @@ -305,7 +304,6 @@ bool GeomAPI_AISObject::setColor(int theR, int theG, int theB) 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); @@ -392,21 +390,6 @@ bool GeomAPI_AISObject::setLineStyle(int theStyle) return isChanged; } -bool GeomAPI_AISObject::setInfiniteState(const bool theState) -{ - bool isChanged = false; - Handle(AIS_InteractiveObject) anAIS = impl(); - if (!anAIS.IsNull() && anAIS->IsInfinite() != theState) { - anAIS->SetInfiniteState(theState); - isChanged = true; - - bool isInfinite = anAIS->IsInfinite(); - int aValue = 9; - } - return isChanged; -} - - bool GeomAPI_AISObject::setTransparensy(double theVal) { bool isChanged = false;