From: nds Date: Wed, 4 May 2016 07:50:50 +0000 (+0300) Subject: #1466 sketch plane when vertex or edge is shown X-Git-Tag: V_2.3.0~48 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a80bad89713c72cc7d663eea4b8dee0c419bbb37;p=modules%2Fshaper.git #1466 sketch plane when vertex or edge is shown --- diff --git a/src/PartSet/PartSet_PreviewPlanes.cpp b/src/PartSet/PartSet_PreviewPlanes.cpp index 424deec9d..7bf7e6963 100755 --- a/src/PartSet/PartSet_PreviewPlanes.cpp +++ b/src/PartSet/PartSet_PreviewPlanes.cpp @@ -33,10 +33,15 @@ bool PartSet_PreviewPlanes::hasVisualizedBodies(ModuleBase_IWorkshop* theWorksho QObjectPtrList aDisplayed = aDisp->displayedObjects(); foreach (ObjectPtr anObj, aDisplayed) { ResultPtr aResult = std::dynamic_pointer_cast(anObj); - if (aResult.get() != NULL) { - aBodyIsVisualized = aResult->groupName() == ModelAPI_ResultBody::group(); - if (aBodyIsVisualized) - break; + // result constructions should not be taken as a body + if (aResult.get() != NULL && aResult->groupName() == ModelAPI_ResultBody::group()) { + GeomShapePtr aShape = aResult->shape(); + if (aShape.get()) { + // vertices, edges should not be taken as a body + aBodyIsVisualized = aShape->shapeType() <= GeomAPI_Shape::FACE; + if (aBodyIsVisualized) + break; + } } } return aBodyIsVisualized;