Salome HOME
Code alignment.
[modules/hydro.git] / src / HYDROOperations / HYDROOperations_Factory.cxx
index 974155b0b6ca12e36838e51a2785f4785cbef311..bfbfbdbf32df934e01e4ac44b1a0528eb804c4c3 100644 (file)
@@ -9,6 +9,8 @@
 #include<ImageComposer_FuseOperator.h>
 #include<ImageComposer_Image.h>
 
+#include <typeinfo>
+
 // global instance
 HYDROOperations_Factory* FACTORY = 0;
 
@@ -76,11 +78,13 @@ void HYDROOperations_Factory::UpdateImage(
   // fill by arguments and process the operation
   ImageComposer_Operator* anOp = Operator(theImage);
   if (anOp) { // update image only if there is an operation
+    QTransform aTransform;
     ImageComposer_Image anImage1; // first referenced image
     if (theImage->NbReferences()) {
       Handle(HYDROData_Image) anImage = theImage->Reference(0);
       anImage1 = anImage->Image();
       anImage1.setTransform(anImage->Trsf());
+      aTransform = anImage1.transform();
     }
     ImageComposer_Image anImage2; // second referenced image
     if (theImage->NbReferences() > 1) {
@@ -90,6 +94,7 @@ void HYDROOperations_Factory::UpdateImage(
     }
     ImageComposer_Image aResImg = anOp->process(anImage1, anImage2);
     theImage->SetImage(aResImg);
+    theImage->SetTrsf(aTransform);
   }
   // change the states of this and all depended images
   theImage->MustBeUpdated(true);