From: adv Date: Wed, 18 Sep 2013 13:53:28 +0000 (+0000) Subject: Minor corrections. X-Git-Tag: BR_hydro_v_0_1~15 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7da50b8119259fd8451a465dc6edbc04e6f89886;p=modules%2Fhydro.git Minor corrections. --- diff --git a/src/HYDROGUI/HYDROGUI_CalculationOp.cxx b/src/HYDROGUI/HYDROGUI_CalculationOp.cxx index 2e36bf50..492b381f 100644 --- a/src/HYDROGUI/HYDROGUI_CalculationOp.cxx +++ b/src/HYDROGUI/HYDROGUI_CalculationOp.cxx @@ -109,11 +109,14 @@ bool HYDROGUI_CalculationOp::processApply( int& theUpdateFlags, } // check that there are no other objects with the same name in the document - Handle(HYDROData_Object) anObject = HYDROGUI_Tool::FindObjectByName( module(), anObjectName ); - if ( !anObject.IsNull() ) + if( !myIsEdit || ( !myEditedObject.IsNull() && myEditedObject->GetName() != anObjectName ) ) { - theErrorMsg = tr( "OBJECT_EXISTS_IN_DOCUMENT" ).arg( anObjectName ); - return false; + Handle(HYDROData_Object) anObject = HYDROGUI_Tool::FindObjectByName( module(), anObjectName ); + if ( !anObject.IsNull() ) + { + theErrorMsg = tr( "OBJECT_EXISTS_IN_DOCUMENT" ).arg( anObjectName ); + return false; + } } Handle(HYDROData_Calculation) aCalculObj = myIsEdit ? myEditedObject : diff --git a/src/HYDROGUI/HYDROGUI_ColorWidget.h b/src/HYDROGUI/HYDROGUI_ColorWidget.h index c80439e7..d969ab25 100644 --- a/src/HYDROGUI/HYDROGUI_ColorWidget.h +++ b/src/HYDROGUI/HYDROGUI_ColorWidget.h @@ -54,7 +54,7 @@ public: //void setRandColor(); signals: - /** is emitted when signal is changed */ + /** is emitted when color is changed */ void colorChanged( const QColor& ); protected: