Salome HOME
Issue #2825: Set the same deflection value from preferences on highlighting as on...
[modules/shaper.git] / src / XGUI / XGUI_Displayer.cpp
index 202afd6b2c7d6253e1a0075e0ec7f1825162bd37..6c54faa53b78dba79c96a0e3516bad58834e84ee 100644 (file)
@@ -86,6 +86,7 @@
 
 #include <Events_Loop.h>
 #include <ModelAPI_Events.h>
+#include <Config_PropManager.h>
 
 #include <set>
 
@@ -693,7 +694,13 @@ Handle(AIS_InteractiveContext) XGUI_Displayer::AISContext() const
       selectionActivate()->deactivateTrihedron(true);
     aContext->DefaultDrawer()->VIsoAspect()->SetNumber(0);
     aContext->DefaultDrawer()->UIsoAspect()->SetNumber(0);
+
     ModuleBase_IViewer::DefaultHighlightDrawer = aContext->HighlightStyle();
+    Handle(Prs3d_Drawer) aSelStyle = aContext->SelectionStyle();
+    double aDeflection = Config_PropManager::real("Visualization", "construction_deflection");
+
+    ModuleBase_IViewer::DefaultHighlightDrawer->SetDeviationCoefficient(aDeflection);
+    aSelStyle->SetDeviationCoefficient(aDeflection);
   }
   return aContext;
 }