From 4e5d076d007e9bdf5e851e0c2c218e5ba07587a2 Mon Sep 17 00:00:00 2001 From: nds Date: Wed, 22 Jun 2016 07:26:53 +0300 Subject: [PATCH] Visualize default sketcher planes if a shown sketch does not contain faces. --- src/PartSet/PartSet_PreviewPlanes.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) 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; -- 2.39.2