]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/FeaturesPlugin/FeaturesPlugin_Scale.cpp
Salome HOME
Merge branch 'csgroup_IS2'
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_Scale.cpp
index 56cbbbf9e29847c9f4232e99d174f009dbaa2774..73cbd10bcb5cae7869880abcacd36228723c3d13 100644 (file)
@@ -92,9 +92,10 @@ void FeaturesPlugin_Scale::performScaleByFactor()
   // Getting objects.
   GeomAPI_ShapeHierarchy anObjects;
   std::list<ResultPtr> aParts;
+  std::string theTextureFile;
   AttributeSelectionListPtr anObjSelList = selectionList(OBJECTS_LIST_ID());
   if (!FeaturesPlugin_Tools::shapesFromSelectionList(
-       anObjSelList, isKeepSubShapes, anObjects, aParts))
+       anObjSelList, isKeepSubShapes, anObjects, aParts, theTextureFile))
     return;
 
   // Getting the center point
@@ -142,6 +143,7 @@ void FeaturesPlugin_Scale::performScaleByFactor()
     ResultBodyPtr aResultBody = document()->createBody(data(), aResultIndex);
     FeaturesPlugin_Tools::loadModifiedShapes(aResultBody, anOriginalShapes, ListOfShape(),
                                              aMakeShapeList, *anIt, "Scaled");
+    aResultBody->setTextureFile(theTextureFile);
     setResult(aResultBody, aResultIndex++);
   }
 
@@ -157,9 +159,10 @@ void FeaturesPlugin_Scale::performScaleByDimensions()
   // Getting objects.
   GeomAPI_ShapeHierarchy anObjects;
   std::list<ResultPtr> aParts;
+  std::string theTextureFile;
   AttributeSelectionListPtr anObjSelList = selectionList(OBJECTS_LIST_ID());
   if (!FeaturesPlugin_Tools::shapesFromSelectionList(
-       anObjSelList, isKeepSubShapes, anObjects, aParts))
+       anObjSelList, isKeepSubShapes, anObjects, aParts, theTextureFile))
     return;
 
   // Getting the center point
@@ -212,6 +215,7 @@ void FeaturesPlugin_Scale::performScaleByDimensions()
     ResultBodyPtr aResultBody = document()->createBody(data(), aResultIndex);
     FeaturesPlugin_Tools::loadModifiedShapes(aResultBody, anOriginalShapes, ListOfShape(),
                                              aMakeShapeList, *anIt, "Scaled");
+    aResultBody->setTextureFile(theTextureFile);
     setResult(aResultBody, aResultIndex++);
   }