From a80bad89713c72cc7d663eea4b8dee0c419bbb37 Mon Sep 17 00:00:00 2001 From: nds Date: Wed, 4 May 2016 10:50:50 +0300 Subject: [PATCH] #1466 sketch plane when vertex or edge is shown --- src/PartSet/PartSet_PreviewPlanes.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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; -- 2.39.2