Salome HOME
projects
/
modules
/
hydro.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
424f823
)
Rename of bathymetry object corrected (Bug #165).
author
adv
<adv@opencascade.com>
Fri, 6 Dec 2013 12:02:04 +0000
(12:02 +0000)
committer
adv
<adv@opencascade.com>
Fri, 6 Dec 2013 12:02:04 +0000
(12:02 +0000)
src/HYDROGUI/HYDROGUI_ImportBathymetryOp.cxx
patch
|
blob
|
history
diff --git
a/src/HYDROGUI/HYDROGUI_ImportBathymetryOp.cxx
b/src/HYDROGUI/HYDROGUI_ImportBathymetryOp.cxx
index ea5eb1e1b3bef3eecb7a8e84d03782eb0014d891..458e2e80bb8368d305a8632b3b5579cfa8683d02 100644
(file)
--- a/
src/HYDROGUI/HYDROGUI_ImportBathymetryOp.cxx
+++ b/
src/HYDROGUI/HYDROGUI_ImportBathymetryOp.cxx
@@
-121,12
+121,15
@@
bool HYDROGUI_ImportBathymetryOp::processApply( int& theUpdateFlags,
return false;
}
return false;
}
- // check that there are no other objects with the same name in the document
- Handle(HYDROData_Entity) anObject = HYDROGUI_Tool::FindObjectByName( module(), anObjectName );
- if ( ( !myIsEdit ) && ( !anObject.IsNull() ) )
+ if( !myIsEdit || ( !myEditedObject.IsNull() && myEditedObject->GetName() != anObjectName ) )
{
{
- theErrorMsg = tr( "OBJECT_EXISTS_IN_DOCUMENT" ).arg( anObjectName );
- return false;
+ // check that there are no other objects with the same name in the document
+ Handle(HYDROData_Entity) anObject = HYDROGUI_Tool::FindObjectByName( module(), anObjectName );
+ if( !anObject.IsNull() )
+ {
+ theErrorMsg = tr( "OBJECT_EXISTS_IN_DOCUMENT" ).arg( anObjectName );
+ return false;
+ }
}
Handle(HYDROData_Bathymetry) aBathymetryObj;
}
Handle(HYDROData_Bathymetry) aBathymetryObj;