]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/SketcherPrs/SketcherPrs_Radius.cpp
Salome HOME
#2205 Ability to customize the arrows and texts of dimensions: GUI correction to...
[modules/shaper.git] / src / SketcherPrs / SketcherPrs_Radius.cpp
index 8e557e32b9c62d10d0afb3fc1604c272dfaa9a9b..3381d5d63a81921dcb339e33a31362801fcd7b7f 100644 (file)
@@ -164,10 +164,12 @@ void SketcherPrs_Radius::Compute(
   // Update variable aspect parameters (depending on viewer scale)
   double aTextSize = 0.0;
   GetValueString(aTextSize);
-  AttributeIntegerPtr aLocationTypeAttr = std::dynamic_pointer_cast<ModelAPI_AttributeInteger>
+
+  AttributeIntegerPtr aLocAttr = std::dynamic_pointer_cast<ModelAPI_AttributeInteger>
     (myConstraint->data()->attribute(SketchPlugin_ConstraintRadius::LOCATION_TYPE_ID()));
-  updateArrows(DimensionAspect(), GetValue(), aTextSize,
-    (SketcherPrs_Tools::LocationType)(aLocationTypeAttr->value()));
+  SketcherPrs_Tools::LocationType aLocationType = aLocAttr->isInitialized() ?
+    (SketcherPrs_Tools::LocationType)(aLocAttr->value()) : SketcherPrs_Tools::LOCATION_AUTOMATIC;
+  updateArrows(DimensionAspect(), GetValue(), aTextSize, aLocationType);
 
   AIS_RadiusDimension::Compute(thePresentationManager, thePresentation, theMode);