From d057f44ce831586611ff3e401f86436e6223fbe9 Mon Sep 17 00:00:00 2001 From: nds Date: Fri, 17 Nov 2017 11:51:55 +0300 Subject: [PATCH] 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. --- src/PartSet/PartSet_Module.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) 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); } } -- 2.39.2