From: nds Date: Wed, 22 Jun 2016 04:26:53 +0000 (+0300) Subject: Visualize default sketcher planes if a shown sketch does not contain faces. X-Git-Tag: V_2.4.0~78 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4e5d076d007e9bdf5e851e0c2c218e5ba07587a2;p=modules%2Fshaper.git Visualize default sketcher planes if a shown sketch does not contain faces. --- diff --git a/src/PartSet/PartSet_PreviewPlanes.cpp b/src/PartSet/PartSet_PreviewPlanes.cpp index 7bf7e6963..e7210b0ce 100755 --- a/src/PartSet/PartSet_PreviewPlanes.cpp +++ b/src/PartSet/PartSet_PreviewPlanes.cpp @@ -9,6 +9,7 @@ #include #include +#include #include #include @@ -58,9 +59,15 @@ bool PartSet_PreviewPlanes::hasVisualizedSketch(ModuleBase_IWorkshop* theWorksho ResultPtr aResult = std::dynamic_pointer_cast(anObj); if (aResult.get() != NULL) { FeaturePtr aFeature = ModelAPI_Feature::feature(aResult); - aSketchIsVisualized = aFeature.get() && aFeature->getKind() == SketchPlugin_Sketch::ID(); - if (aSketchIsVisualized) - break; + if (aFeature.get() && aFeature->getKind() == SketchPlugin_Sketch::ID()) { + ResultConstructionPtr aCResult = std::dynamic_pointer_cast + (aResult); + if (aCResult.get() && aCResult->facesNum() > 0) { + aSketchIsVisualized = true; + break; + } + } + break; } } return aSketchIsVisualized;