]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Set highlighting without ISO lines
authorvsv <vsv@opencascade.com>
Tue, 28 Jan 2020 10:08:19 +0000 (13:08 +0300)
committervsv <vsv@opencascade.com>
Tue, 28 Jan 2020 10:08:19 +0000 (13:08 +0300)
src/ModuleBase/ModuleBase_ResultPrs.cpp
src/XGUI/XGUI_Displayer.cpp

index e58f460dae4da316eb218daa967bad8a790ca0fc..9e2fca11082fe81252cc060dc906511f0d780be7 100644 (file)
@@ -18,6 +18,7 @@
 //
 
 #include "ModuleBase_ResultPrs.h"
+#include "ModuleBase_IViewer.h"
 
 #include <GeomAPI_PlanarEdges.h>
 
@@ -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
index f1c43984fdb46e52d8f34c72d300629ca68a02ae..d93f159c7a7cd6385ab663c1197eab6beea39253 100644 (file)
@@ -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();