]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
NPAL19657: EDF Color problem with rotation.
authorjfa <jfa@opencascade.com>
Wed, 23 Apr 2008 09:07:08 +0000 (09:07 +0000)
committerjfa <jfa@opencascade.com>
Wed, 23 Apr 2008 09:07:08 +0000 (09:07 +0000)
src/TransformationGUI/TransformationGUI_RotationDlg.cxx
src/TransformationGUI/TransformationGUI_RotationDlg.h

index a5b4a97d6096ca587e01de09e35bf35a4e8f4d0e..c991cd9a6fbec72b86bb41f1f2c8a5bfd43f7d68 100644 (file)
@@ -462,6 +462,7 @@ bool TransformationGUI_RotationDlg::execute( ObjectList& objects )
        if (toCreateCopy)
          for (int i = 0; i < myObjects.length(); i++)
            {
+              myCurrObject = myObjects[i];
              anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->
                 RotateCopy( myObjects[i], myAxis, GetAngle() * PI180 );
              if ( !anObj->_is_nil() )
@@ -470,6 +471,7 @@ bool TransformationGUI_RotationDlg::execute( ObjectList& objects )
        else
          for (int i = 0; i < myObjects.length(); i++)
            {
+              myCurrObject = myObjects[i];
              anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->
                 Rotate( myObjects[i], myAxis, GetAngle() * PI180 );
              if ( !anObj->_is_nil() )
@@ -483,6 +485,7 @@ bool TransformationGUI_RotationDlg::execute( ObjectList& objects )
        if (toCreateCopy)
          for (int i = 0; i < myObjects.length(); i++)
            {
+              myCurrObject = myObjects[i];
              anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->
                 RotateThreePointsCopy( myObjects[i], myCentPoint, myPoint1, myPoint2 );
              if ( !anObj->_is_nil() )
@@ -491,6 +494,7 @@ bool TransformationGUI_RotationDlg::execute( ObjectList& objects )
        else
          for (int i = 0; i < myObjects.length(); i++)
            {
+              myCurrObject = myObjects[i];
              anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->
                 RotateThreePoints( myObjects[i], myCentPoint, myPoint1, myPoint2 );    
              if ( !anObj->_is_nil() )
@@ -512,8 +516,13 @@ void TransformationGUI_RotationDlg::restoreSubShapes (SALOMEDS::Study_ptr   theS
                                                       SALOMEDS::SObject_ptr theSObject)
 {
   if (CheckBoxRestoreSS->isChecked()) {
-    // empty list of arguments means that all arguments should be restored
-    getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(),
+    // we pass here the first operation argument (object) through the list of arguments
+    // because the rotation operation place its arguments in the data structure in another order,
+    // and we need to point the first argument directly
+    GEOM::ListOfGO_var anArgs = new GEOM::ListOfGO;
+    anArgs->length(1);
+    anArgs[0] = myCurrObject;
+    getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, anArgs,
                                         /*theFindMethod=*/GEOM::FSM_Transformed,
                                         /*theInheritFirstArg=*/true);
   }
index 80fd4aad0fc88012c0250f866a0c4fe0fd229255..7b89e22fe4b3f47fb66158194560e390966595d6 100644 (file)
@@ -58,6 +58,7 @@ private:
     double GetAngle() const;
 
     GEOM::ListOfGO myObjects;
+    GEOM::GEOM_Object_var myCurrObject;
     GEOM::GEOM_Object_var myAxis, myCentPoint, myPoint1, myPoint2;
 
     DlgRef_4Sel1Spin2Check* GroupPoints;