- if (!aLocationAttribute.empty())
- {
- std::shared_ptr<ModelAPI_AttributeInteger> aTypeAttr = std::dynamic_pointer_cast<
- ModelAPI_AttributeInteger>(myConstraint->data()->attribute(aLocationAttribute));
- aLocationType = (SketcherPrs_Tools::LocationType)(aTypeAttr->value());
- }
- updateArrows(DimensionAspect(), GetValue(), aTextSize, aLocationType);
+ else if (aConstraintKind == SketchPlugin_ConstraintDistance::ID())
+ aLocationAttribute = SketchPlugin_ConstraintDistance::LOCATION_TYPE_ID();
+ else if (aConstraintKind == SketchPlugin_ConstraintDistanceHorizontal::ID())
+ aLocationAttribute = SketchPlugin_ConstraintDistanceHorizontal::LOCATION_TYPE_ID();
+ else if (aConstraintKind == SketchPlugin_ConstraintDistanceVertical::ID())
+ aLocationAttribute = SketchPlugin_ConstraintDistanceVertical::LOCATION_TYPE_ID();
+
+ std::shared_ptr<ModelAPI_AttributeInteger> aLocationTypeAttr = std::dynamic_pointer_cast<
+ ModelAPI_AttributeInteger>(myConstraint->data()->attribute(aLocationAttribute));
+ updateArrows(DimensionAspect(), GetValue(), aTextSize,
+ (SketcherPrs_Tools::LocationType)(aLocationTypeAttr->value()));