]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix the problem of an arc moving
authorazv <azv@opencascade.com>
Wed, 25 Mar 2015 09:15:26 +0000 (12:15 +0300)
committerazv <azv@opencascade.com>
Wed, 25 Mar 2015 09:15:39 +0000 (12:15 +0300)
src/SketchPlugin/SketchPlugin_Arc.cpp

index 0cb74987a0e63c5a060f709a26142415cdce9834..27e3512ba0271294e165b54cf2566b7366146b82 100644 (file)
@@ -148,10 +148,6 @@ void SketchPlugin_Arc::move(double theDeltaX, double theDeltaY)
   if (!aData->isValid())
     return;
 
-  std::shared_ptr<GeomDataAPI_Point2D> aPoint1 = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
-      aData->attribute(SketchPlugin_Arc::CENTER_ID()));
-  aPoint1->move(theDeltaX, theDeltaY);
-
   myStartUpdate = true;
   myEndUpdate = true;
   std::shared_ptr<GeomDataAPI_Point2D> aPoint2 = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
@@ -163,6 +159,10 @@ void SketchPlugin_Arc::move(double theDeltaX, double theDeltaY)
   aPoint3->move(theDeltaX, theDeltaY);
   myStartUpdate = false;
   myEndUpdate = false;
+
+  std::shared_ptr<GeomDataAPI_Point2D> aPoint1 = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
+      aData->attribute(SketchPlugin_Arc::CENTER_ID()));
+  aPoint1->move(theDeltaX, theDeltaY);
 }
 
 double SketchPlugin_Arc::distanceToPoint(const std::shared_ptr<GeomAPI_Pnt2d>& thePoint)