Salome HOME
Small formatting and fix of addCircle
[modules/shaper.git] / src / SketcherPrs / SketcherPrs_Tools.cpp
index ad33dbe9b679b8bfdec974128df93320f4a10021..7947c38a2c909bf475f9f5a4577527716adf0392 100644 (file)
@@ -17,7 +17,7 @@
 #include <ModelAPI_AttributeDouble.h>
 #include <ModelAPI_Events.h>
 
-#include <Events_Error.h>
+#include <Events_InfoMessage.h>
 
 #include <GeomDataAPI_Point2D.h>
 #include <GeomAPI_Lin2d.h>
@@ -364,7 +364,7 @@ void updateArrows(Handle(Prs3d_DimensionAspect) theDimAspect, double theDimValue
   if(theTextSize > ((theDimValue - 3 * SketcherPrs_Tools::getArrowSize()) * aViewerScale)) {
     theDimAspect->SetTextHorizontalPosition(Prs3d_DTHP_Left);
     theDimAspect->SetArrowOrientation(Prs3d_DAO_External);
-    theDimAspect->SetExtensionSize(theTextSize / aViewerScale - SketcherPrs_Tools::getArrowSize() / 2.0);
+    theDimAspect->SetExtensionSize((theTextSize / aViewerScale + SketcherPrs_Tools::getArrowSize()) / 2.0);
   } else {
     theDimAspect->SetTextHorizontalPosition(Prs3d_DTHP_Center);
     theDimAspect->SetArrowOrientation(Prs3d_DAO_Internal);
@@ -376,7 +376,7 @@ void updateArrows(Handle(Prs3d_DimensionAspect) theDimAspect, double theDimValue
 
 void sendEmptyPresentationError(ModelAPI_Feature* theFeature, const std::string theError)
 {
-  Events_Error::throwException("An empty AIS presentation: SketcherPrs_LengthDimension");
+  Events_InfoMessage("SketcherPrs_Tools", "An empty AIS presentation: SketcherPrs_LengthDimension").send();
   static const Events_ID anEvent = Events_Loop::eventByName(EVENT_EMPTY_AIS_PRESENTATION);
   std::shared_ptr<ModelAPI_Object> aConstraintPtr(theFeature);
   ModelAPI_EventCreator::get()->sendUpdated(aConstraintPtr, anEvent);