From d69bbb213918ba0a58a7c37acae6dbf117d57f93 Mon Sep 17 00:00:00 2001 From: vsv Date: Thu, 15 Oct 2015 18:06:59 +0300 Subject: [PATCH] Issue #940: Avoid creation of dimension presentation with different text alignment for displaying and selection --- src/SketcherPrs/SketcherPrs_LengthDimension.cpp | 7 +++++-- src/SketcherPrs/SketcherPrs_Radius.cpp | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/SketcherPrs/SketcherPrs_LengthDimension.cpp b/src/SketcherPrs/SketcherPrs_LengthDimension.cpp index 347d8b12c..3ab9bc6be 100644 --- a/src/SketcherPrs/SketcherPrs_LengthDimension.cpp +++ b/src/SketcherPrs/SketcherPrs_LengthDimension.cpp @@ -55,11 +55,14 @@ void SketcherPrs_LengthDimension::Compute(const Handle(PrsMgr_PresentationManage gp_Pnt aPnt1, aPnt2; if (!getPoints(aPnt1, aPnt2)) return; - myAspect->SetExtensionSize(myAspect->ArrowAspect()->Length()); - myAspect->SetArrowTailSize(myAspect->ArrowAspect()->Length()); + double aD = SketcherPrs_Tools::getFlyoutDistance(myConstraint); SetFlyout(SketcherPrs_Tools::getFlyoutDistance(myConstraint)); SetMeasuredGeometry(aPnt1, aPnt2, myPlane->impl()); + myAspect->SetExtensionSize(myAspect->ArrowAspect()->Length()); + myAspect->SetArrowTailSize(myAspect->ArrowAspect()->Length()); + // The value of vertical aligment is sometimes changed + myAspect->TextAspect()->SetVerticalJustification(Graphic3d_VTA_CENTER); AIS_LengthDimension::Compute(thePresentationManager, thePresentation, theMode); } diff --git a/src/SketcherPrs/SketcherPrs_Radius.cpp b/src/SketcherPrs/SketcherPrs_Radius.cpp index 9a1ac1676..4a805eae7 100644 --- a/src/SketcherPrs/SketcherPrs_Radius.cpp +++ b/src/SketcherPrs/SketcherPrs_Radius.cpp @@ -100,6 +100,8 @@ void SketcherPrs_Radius::Compute(const Handle(PrsMgr_PresentationManager3d)& the myAspect->SetExtensionSize(myAspect->ArrowAspect()->Length()); myAspect->SetArrowTailSize(myAspect->ArrowAspect()->Length()); + // The value of vertical aligment is sometimes changed + myAspect->TextAspect()->SetVerticalJustification(Graphic3d_VTA_CENTER); AIS_RadiusDimension::Compute(thePresentationManager, thePresentation, theMode); } -- 2.39.2