From 5577a71e0ecc017badbfad8366263244b682e4b9 Mon Sep 17 00:00:00 2001 From: vsv Date: Mon, 18 Feb 2019 12:02:43 +0300 Subject: [PATCH] Issue #2867: Use enumeration values for ZLayer definition --- src/FeaturesPlugin/FeaturesPlugin_Measurement.cpp | 2 +- src/XGUI/XGUI_ViewerProxy.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/FeaturesPlugin/FeaturesPlugin_Measurement.cpp b/src/FeaturesPlugin/FeaturesPlugin_Measurement.cpp index 7d04b88d6..0d97dd7dc 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Measurement.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Measurement.cpp @@ -615,7 +615,7 @@ void FeaturesPlugin_Measurement::setupDimension(AISObjectPtr theDim) anAspect->SetExtensionSize((aTextSize / mySceenScale + aSize) / 2.0); aDim->SetDimensionAspect(anAspect); - aDim->SetZLayer(1); + aDim->SetZLayer(Graphic3d_ZLayerId_Top); std::vector aColor = Config_PropManager::color("Visualization", "sketch_dimension_color"); theDim->setColor(aColor[0], aColor[1], aColor[2]); } diff --git a/src/XGUI/XGUI_ViewerProxy.cpp b/src/XGUI/XGUI_ViewerProxy.cpp index 27277683a..71c7a9f40 100644 --- a/src/XGUI/XGUI_ViewerProxy.cpp +++ b/src/XGUI/XGUI_ViewerProxy.cpp @@ -427,7 +427,7 @@ void XGUI_ViewerProxy::displayHighlight(FeaturePtr theFeature, const TopoDS_Shap if (!aTShape.IsSame(theIgnoreShape)) { aAis = new AIS_Shape(aTShape); aAis->SetColor(HIGHLIGHT_COLOR); - aAis->SetZLayer(1); //Graphic3d_ZLayerId_Topmost + aAis->SetZLayer(Graphic3d_ZLayerId_Top); //Graphic3d_ZLayerId_Topmost aDeflection = Config_PropManager::real("Visualization", "construction_deflection"); aAis->Attributes()->SetDeviationCoefficient(aDeflection); myHighlights.Append(aAis); @@ -441,7 +441,7 @@ void XGUI_ViewerProxy::displayHighlight(FeaturePtr theFeature, const TopoDS_Shap TopoDS_Shape aTShape = myResult->shape()->impl(); Handle(AIS_Shape) aAis = new AIS_Shape(aTShape); aAis->SetColor(HIGHLIGHT_COLOR); - aAis->SetZLayer(1); //Graphic3d_ZLayerId_Topmost + aAis->SetZLayer(Graphic3d_ZLayerId_Top); //Graphic3d_ZLayerId_Topmost aDeflection = Config_PropManager::real("Visualization", "body_deflection"); aAis->Attributes()->SetDeviationCoefficient(aDeflection); myHighlights.Append(aAis); -- 2.39.2