/// \param theDimAspect an aspect to be changed
/// \param theDimValue an arrow value
/// \param theTextSize an arrow value
-extern void updateArrows(Handle_Prs3d_DimensionAspect theDimAspect,
+extern void updateArrows(Handle(Prs3d_DimensionAspect) theDimAspect,
double theDimValue, double theTextSize, SketcherPrs_Tools::LocationType theLocationType);
// 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);
return;
}
}
- SetSelToleranceForText2d(SketcherPrs_Tools::getTextHeight());
+ SetSelToleranceForText2d(SketcherPrs_Tools::getArrowSize()/5.);
AIS_RadiusDimension::ComputeSelection(aSelection, aMode);
}