From: vsv Date: Wed, 9 Jan 2019 14:34:25 +0000 (+0300) Subject: Fix possible exception in case if deflection parameter is not defined in preferences X-Git-Tag: Jan2019~36 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=14d68de6614cff9ee4ff1ffafa572a36f0eccad3;p=modules%2Fshaper.git Fix possible exception in case if deflection parameter is not defined in preferences --- diff --git a/src/XGUI/XGUI_Displayer.cpp b/src/XGUI/XGUI_Displayer.cpp index 6c54faa53..8eb1c1261 100644 --- a/src/XGUI/XGUI_Displayer.cpp +++ b/src/XGUI/XGUI_Displayer.cpp @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -697,7 +698,10 @@ Handle(AIS_InteractiveContext) XGUI_Displayer::AISContext() const ModuleBase_IViewer::DefaultHighlightDrawer = aContext->HighlightStyle(); Handle(Prs3d_Drawer) aSelStyle = aContext->SelectionStyle(); - double aDeflection = Config_PropManager::real("Visualization", "construction_deflection"); + double aDeflection = QString(ModelAPI_ResultConstruction::DEFAULT_DEFLECTION().c_str()).toDouble(); + try { + aDeflection = Config_PropManager::real("Visualization", "construction_deflection"); + } catch (...) {} ModuleBase_IViewer::DefaultHighlightDrawer->SetDeviationCoefficient(aDeflection); aSelStyle->SetDeviationCoefficient(aDeflection);