]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #940: Avoid creation of dimension presentation with different text alignment...
authorvsv <vitaly.smetannikov@opencascade.com>
Thu, 15 Oct 2015 15:06:59 +0000 (18:06 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Thu, 15 Oct 2015 15:06:59 +0000 (18:06 +0300)
src/SketcherPrs/SketcherPrs_LengthDimension.cpp
src/SketcherPrs/SketcherPrs_Radius.cpp

index 347d8b12cd50e044fa905990b8f92a795f0af835..3ab9bc6be8b050906cf8d2e6b2679692841bf5aa 100644 (file)
@@ -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<gp_Ax3>());
+  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);
 }
 
index 9a1ac1676635a2ce22e10b4cd507ae62192f84ea..4a805eae7005cb4279b33ad971c818df6e786752 100644 (file)
@@ -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);
 }