Salome HOME
Dump Bathymetry data to python script (Feature #13).
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_TwoImagesOp.cxx
index 8754c3056ada10f71c61c64a767d5459b85ca2e3..74deaf716f1e178ad6f5c9d3fbd6803096467413 100644 (file)
@@ -112,6 +112,14 @@ void HYDROGUI_TwoImagesOp::startOperation()
         aSelectedName2 = anImage2->GetName();
     }
     aPanel->setSelectedImages( aSelectedName1, aSelectedName2 );
+
+    HYDROOperations_Factory* aFactory = HYDROOperations_Factory::Factory();
+    if( ImageComposer_Operator* anOperator = aFactory->Operator( myEditedObject ) )
+    {
+      QColor aColor;
+      anOperator->getArgs( aColor );
+      aPanel->setColor( aColor );
+    }
   }
 }
 
@@ -175,6 +183,13 @@ bool HYDROGUI_TwoImagesOp::processApply( int& theUpdateFlags,
   aResult->SetName( anImageName );
   aResult->AppendReference( anImage1 );
   aResult->AppendReference( anImage2 );
+
+  if( ImageComposer_Operator* anOperator = aFactory->Operator( aResult ) )
+  {
+    anOperator->setArgs( aPanel->getColor() );
+    aResult->SetArgs( anOperator->getBinArgs() );
+  }
+
   aFactory->UpdateImage( doc(), aResult );
 
   if( !myIsEdit )
@@ -183,7 +198,6 @@ bool HYDROGUI_TwoImagesOp::processApply( int& theUpdateFlags,
     module()->setObjectVisible( aViewId, anImage1, false );
     module()->setObjectVisible( aViewId, anImage2, false );
     module()->setObjectVisible( aViewId, aResult, true );
-
   }
 
   theUpdateFlags = UF_Model | UF_Viewer | UF_GV_Forced;