From: mpv Date: Wed, 3 Jun 2015 13:09:50 +0000 (+0300) Subject: Make "concealment" property disabled with disabling of the feature: to be able to... X-Git-Tag: V_1.2.1~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c1738e813dd8c684865e16a3236ae4d0caf0e521;p=modules%2Fshaper.git Make "concealment" property disabled with disabling of the feature: to be able to preview the extrusion that was an argument of Boolean operation --- diff --git a/src/GeomAPI/GeomAPI_Shape.cpp b/src/GeomAPI/GeomAPI_Shape.cpp index 955fb1233..f8139103c 100644 --- a/src/GeomAPI/GeomAPI_Shape.cpp +++ b/src/GeomAPI/GeomAPI_Shape.cpp @@ -46,25 +46,25 @@ bool GeomAPI_Shape::isVertex() const bool GeomAPI_Shape::isEdge() const { const TopoDS_Shape& aShape = const_cast(this)->impl(); - return aShape.ShapeType() == TopAbs_EDGE; + return !aShape.IsNull() && aShape.ShapeType() == TopAbs_EDGE; } bool GeomAPI_Shape::isFace() const { const TopoDS_Shape& aShape = const_cast(this)->impl(); - return aShape.ShapeType() == TopAbs_FACE; + return !aShape.IsNull() && aShape.ShapeType() == TopAbs_FACE; } bool GeomAPI_Shape::isCompound() const { const TopoDS_Shape& aShape = const_cast(this)->impl(); - return aShape.ShapeType() == TopAbs_COMPOUND; + return !aShape.IsNull() && aShape.ShapeType() == TopAbs_COMPOUND; } bool GeomAPI_Shape::isSolid() const { const TopoDS_Shape& aShape = const_cast(this)->impl(); - return aShape.ShapeType() == TopAbs_SOLID; + return !aShape.IsNull() && aShape.ShapeType() == TopAbs_SOLID; } bool GeomAPI_Shape::computeSize(double& theXmin, double& theYmin, double& theZmin, diff --git a/src/Model/Model_Data.cpp b/src/Model/Model_Data.cpp index 0fff37fd7..e3020d992 100644 --- a/src/Model/Model_Data.cpp +++ b/src/Model/Model_Data.cpp @@ -309,7 +309,10 @@ void Model_Data::addBackReference(FeaturePtr theFeature, std::string theAttrID, ModelAPI_Session::get()->validators()->isConcealed(theFeature->getKind(), theAttrID)) { std::shared_ptr aRes = std::dynamic_pointer_cast(myObject); - if (aRes) { + // the second condition is for history upper than concealment causer, so the feature result may + // be displayed and previewed; also for avoiding of quick show/hide on history + // moving deep down + if (aRes && !theFeature->isDisabled()) { aRes->setIsConcealed(true); } }