From 22bd412d1ba9ee144823c87e47e6a380c3d5162a Mon Sep 17 00:00:00 2001 From: vsv Date: Tue, 28 Jan 2020 13:08:19 +0300 Subject: [PATCH] Set highlighting without ISO lines --- src/ModuleBase/ModuleBase_ResultPrs.cpp | 13 +++++++++++++ src/XGUI/XGUI_Displayer.cpp | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/ModuleBase/ModuleBase_ResultPrs.cpp b/src/ModuleBase/ModuleBase_ResultPrs.cpp index e58f460da..9e2fca110 100644 --- a/src/ModuleBase/ModuleBase_ResultPrs.cpp +++ b/src/ModuleBase/ModuleBase_ResultPrs.cpp @@ -18,6 +18,7 @@ // #include "ModuleBase_ResultPrs.h" +#include "ModuleBase_IViewer.h" #include @@ -89,6 +90,18 @@ ModuleBase_ResultPrs::ModuleBase_ResultPrs(ResultPtr theResult) else aDrawer->SetPointAspect(new Prs3d_PointAspect(Aspect_TOM_PLUS, Quantity_NOC_YELLOW, 1.)); + aDrawer = DynamicHilightAttributes(); + if (aDrawer.IsNull()) { + if (!ModuleBase_IViewer::DefaultHighlightDrawer.IsNull()) { + aDrawer = new Prs3d_Drawer(*ModuleBase_IViewer::DefaultHighlightDrawer); + aDrawer->VIsoAspect()->SetNumber(0); + aDrawer->UIsoAspect()->SetNumber(0); + SetDynamicHilightAttributes(aDrawer); + } + } else { + aDrawer->VIsoAspect()->SetNumber(0); + aDrawer->UIsoAspect()->SetNumber(0); + } myHiddenSubShapesDrawer = new AIS_ColoredDrawer(myDrawer); Handle(Prs3d_ShadingAspect) aShadingAspect = new Prs3d_ShadingAspect(); aShadingAspect->SetMaterial(Graphic3d_NOM_BRASS); //default value of context material diff --git a/src/XGUI/XGUI_Displayer.cpp b/src/XGUI/XGUI_Displayer.cpp index f1c43984f..d93f159c7 100644 --- a/src/XGUI/XGUI_Displayer.cpp +++ b/src/XGUI/XGUI_Displayer.cpp @@ -634,7 +634,7 @@ Handle(AIS_InteractiveContext) XGUI_Displayer::AISContext() const //aTrihedron->getHighlightPointAspect()->SetTypeOfMarker(Aspect_TOM_O_STAR); // Commented out according to discussion in bug #2825 - //ModuleBase_IViewer::DefaultHighlightDrawer = aContext->HighlightStyle(); + ModuleBase_IViewer::DefaultHighlightDrawer = aContext->HighlightStyle(); //Handle(Prs3d_Drawer) aSelStyle = aContext->SelectionStyle(); //double aDeflection = // QString(ModelAPI_ResultConstruction::DEFAULT_DEFLECTION().c_str()).toDouble(); -- 2.39.2