Salome HOME
Merge remote-tracking branch 'origin/BR_SHP_FORMAT2' into BR_LAND_COVER_MAP
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_ProfileInterpolateOp.cxx
index 0f8d398ff9e142a7c62f1b6cf5d1da76ec359a9e..3bfb229203d426a8ee7b993b66ac36ad8f7fd463 100644 (file)
@@ -1,8 +1,4 @@
-// Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
+// Copyright (C) 2014-2015  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
 // License as published by the Free Software Foundation; either
@@ -69,11 +65,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() );
+      }
     }
 }
 
@@ -147,7 +146,7 @@ bool HYDROGUI_ProfileInterpolateOp::processApply( int& theUpdateFlags, QString&
             }
         }
         else
-            errMessage = tr( "CANT_GET_RIVER_OBJECT" ).arg( aDlg->river() );
+            errMessage = tr( "CANT_GET_STREAM_OBJECT" ).arg( aDlg->river() );
 
         if ( !errMessage.isEmpty() )
             QMessageBox::critical( aDlg->topLevelWidget(), tr( "INTERPOLATION_ERROR" ), errMessage, QMessageBox::Ok );