From: nds Date: Fri, 17 Nov 2017 08:51:55 +0000 (+0300) Subject: Issue #2199 Import of edges participating to the result of the sketch. Set Z layer... X-Git-Tag: V_2.10.0RC~157 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d057f44ce831586611ff3e401f86436e6223fbe9;p=modules%2Fshaper.git Issue #2199 Import of edges participating to the result of the sketch. Set Z layer for projection presentations due to this lines are tool thin and are hidden behind any other lines. --- diff --git a/src/PartSet/PartSet_Module.cpp b/src/PartSet/PartSet_Module.cpp index 3f3c23bd5..57d9fc6b7 100755 --- a/src/PartSet/PartSet_Module.cpp +++ b/src/PartSet/PartSet_Module.cpp @@ -90,14 +90,15 @@ #include #include -#include -#include #include #include #include #include #include #include +#include +#include +#include #include #include @@ -934,15 +935,21 @@ void PartSet_Module::onObjectDisplayed(ObjectPtr theObject, AISObjectPtr theAIS) { Handle(AIS_InteractiveObject) anAIS = theAIS->impl(); if (!anAIS.IsNull()) { + bool aToUseZLayer = false; + FeaturePtr aFeature = ModelAPI_Feature::feature(theObject); + if (aFeature.get() && PartSet_Tools::findRefsToMeFeature(aFeature, + SketchPlugin_Projection::ID())) + aToUseZLayer = true; Handle(AIS_InteractiveContext) aCtx = anAIS->GetContext(); Handle(AIS_Dimension) aDim = Handle(AIS_Dimension)::DownCast(anAIS); if (!aDim.IsNull()) { - aCtx->SetZLayer(aDim, myVisualLayerId); + aToUseZLayer = true; } else { Handle(SketcherPrs_SymbolPrs) aCons = Handle(SketcherPrs_SymbolPrs)::DownCast(anAIS); if (!aCons.IsNull()) - aCtx->SetZLayer(aCons, myVisualLayerId); + aToUseZLayer = true; } + aCtx->SetZLayer(anAIS, myVisualLayerId); } }