Salome HOME
global misprinting in the word "splitted" is replaced by "split"
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_TwoImagesOp.cxx
index 990673a64a649ebcf7070fc41513c59d85d7f571..8ebdf0259ed9788dabdf1cc4ed41c499e7fb87a1 100644 (file)
@@ -1,12 +1,8 @@
-// Copyright (C) 2007-2013  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
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -23,7 +19,7 @@
 #include "HYDROGUI_TwoImagesOp.h"
 
 #include "HYDROGUI_Module.h"
-#include "HYDROGUI_Tool.h"
+#include "HYDROGUI_Tool2.h"
 #include "HYDROGUI_TwoImagesDlg.h"
 #include "HYDROGUI_UpdateFlags.h"
 #include <HYDROGUI_DataObject.h>
@@ -54,7 +50,7 @@ HYDROGUI_TwoImagesOp::HYDROGUI_TwoImagesOp( HYDROGUI_Module* theModule,
   {
     case Fuse: aName = theIsEdit ? tr( "EDIT_FUSED_IMAGE" ) : tr( "FUSE_IMAGES" ); break;
     case Cut: aName = theIsEdit ? tr( "EDIT_CUT_IMAGE" ) : tr( "CUT_IMAGES" ); break;
-    case Split: aName = theIsEdit ? tr( "EDIT_SPLITTED_IMAGE" ) : tr( "SPLIT_IMAGE" ); break;
+    case Split: aName = theIsEdit ? tr( "EDIT_SPLIT_IMAGE" ) : tr( "SPLIT_IMAGE" ); break;
     default: break;
   }
   setName( aName );
@@ -88,7 +84,8 @@ void HYDROGUI_TwoImagesOp::startOperation()
   QString anImageName;
   if( myIsEdit )
   {
-    myEditedObject = Handle(HYDROData_Image)::DownCast( HYDROGUI_Tool::GetSelectedObject( module() ) );
+    if ( isApplyAndClose() )
+      myEditedObject = Handle(HYDROData_Image)::DownCast( HYDROGUI_Tool::GetSelectedObject( module() ) );
     if( !myEditedObject.IsNull() )
       anImageName = myEditedObject->GetName();
   }
@@ -232,7 +229,7 @@ bool HYDROGUI_TwoImagesOp::processApply( int& theUpdateFlags,
     Handle(HYDROData_Image) aSelectedImage = Handle(HYDROData_Image)::DownCast( anObject1 );
     if( !aSelectedImage.IsNull() )
     {
-      aSelectedImage->SetIsSelfSplitted( true );
+      aSelectedImage->SetIsSelfSplit( true );
       aSelectedImage->SetImage( aResult->Image() );
       aSelectedImage->SetTrsf( aResult->Trsf() );
       aResult->Remove();