Salome HOME
Issue #3137: Crash when LinearCopy/AngularCopy of several parts
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_Scale.cpp
index a2c6105c8bce9258524498c03f1714a582f61f9f..bdb4cdd52fde517cc999053ac555b78368b7d3f9 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-// See http://www.salome-platform.org/ or
-// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
 #include <FeaturesPlugin_Scale.h>
@@ -138,8 +137,15 @@ void FeaturesPlugin_Scale::performScaleByFactor()
     }
 
     ResultBodyPtr aResultBody = document()->createBody(data(), aResultIndex);
-    aResultBody->storeModified(aBaseShape, aScaleAlgo->shape());
-    FeaturesPlugin_Tools::loadModifiedShapes(aResultBody, aBaseShape, aScaleAlgo, "Scaled");
+
+    ListOfShape aShapes;
+    aShapes.push_back(aBaseShape);
+    FeaturesPlugin_Tools::loadModifiedShapes(aResultBody,
+                                             aShapes,
+                                             ListOfShape(),
+                                             aScaleAlgo,
+                                             aScaleAlgo->shape(),
+                                             "Scaled");
     setResult(aResultBody, aResultIndex);
     aResultIndex++;
   }
@@ -216,8 +222,15 @@ void FeaturesPlugin_Scale::performScaleByDimensions()
     }
 
     ResultBodyPtr aResultBody = document()->createBody(data(), aResultIndex);
-    aResultBody->storeModified(aBaseShape, aScaleAlgo->shape());
-    FeaturesPlugin_Tools::loadModifiedShapes(aResultBody, aBaseShape, aScaleAlgo, "Scaled");
+
+    ListOfShape aShapes;
+    aShapes.push_back(aBaseShape);
+    FeaturesPlugin_Tools::loadModifiedShapes(aResultBody,
+                                             aShapes,
+                                             ListOfShape(),
+                                             aScaleAlgo,
+                                             aScaleAlgo->shape(),
+                                             "Scaled");
     setResult(aResultBody, aResultIndex);
     aResultIndex++;
   }