]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
0021031: EDF 1646 GEOM: Modify Location leads to Position driver failed
authordmv <dmv@opencascade.com>
Wed, 13 Oct 2010 14:45:24 +0000 (14:45 +0000)
committerdmv <dmv@opencascade.com>
Wed, 13 Oct 2010 14:45:24 +0000 (14:45 +0000)
src/GEOMImpl/GEOMImpl_ITransformOperations.cxx
src/TransformationGUI/TransformationGUI_PositionDlg.cxx

index 744bdc20005147727b9e3a45d90087701c44e813..259e42e35470045039446398272e4b6e54629804 100644 (file)
@@ -1236,6 +1236,9 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::PositionShape
   Handle(GEOM_Function) anOriginal = theObject->GetLastFunction();
   if (anOriginal.IsNull()) return NULL; //There is no function which creates an object to be set in position
 
+  Handle(GEOM_Function) aSrcF;
+  if (!theStartLCS.IsNull()) aSrcF = theStartLCS->GetLastFunction();
+
   //Add a Position function
   Standard_Integer aType = POSITION_SHAPE;
   if (theStartLCS.IsNull()) aType = POSITION_SHAPE_FROM_GLOBAL;
@@ -1252,7 +1255,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::PositionShape
   aTI.SetShape(anOriginal);
   aTI.SetEndLCS(theEndLCS->GetLastFunction());
   if (!theStartLCS.IsNull())
-    aTI.SetStartLCS(theStartLCS->GetLastFunction());
+    aTI.SetStartLCS(aSrcF);
 
   //Compute the Position
   try {
index ccbc45ab307539fcc93998adc499266e1ce7de7d..13ef19d781301abe887dfe169a3b9ff467553a54 100644 (file)
@@ -633,7 +633,6 @@ bool TransformationGUI_PositionDlg::execute (ObjectList& objects)
   case 1:
     {
       for (int i = 0; i < myObjects.length(); i++) {
-        if (toCreateCopy)
           anObj = toCreateCopy ? 
             anOper->PositionShapeCopy(myObjects[i], myStartLCS, myEndLCS) :
             anOper->PositionShape(myObjects[i], myStartLCS, myEndLCS);