Salome HOME
quick optimization patch (bytearray for images)
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_ProfileInterpolateOp.cxx
index fd2932ae3881aff41206a27da18a98f420b8f79c..3ea3a5ea84cd10b67af289a4158ef828e3fa960e 100644 (file)
@@ -19,6 +19,7 @@
 #include <HYDROGUI_ProfileInterpolateOp.h>
 
 #include "HYDROGUI_Tool.h"
+#include "HYDROGUI_Tool2.h"
 #include "HYDROGUI_Module.h"
 #include "HYDROGUI_DataObject.h"
 #include "HYDROGUI_UpdateFlags.h"
@@ -65,11 +66,14 @@ void HYDROGUI_ProfileInterpolateOp::startOperation()
 {
     HYDROGUI_Operation::startOperation();
 
-    HYDROGUI_ProfileInterpolateDlg* aPanel = ::qobject_cast<HYDROGUI_ProfileInterpolateDlg*>( inputPanel() );
-    if ( aPanel )
+    if ( isApplyAndClose() )
     {
+      HYDROGUI_ProfileInterpolateDlg* aPanel = ::qobject_cast<HYDROGUI_ProfileInterpolateDlg*>( inputPanel() );
+      if ( aPanel )
+      {
         aPanel->reset();
         aPanel->setInterpolators( interpolators() );
+      }
     }
 }