From 7da50b8119259fd8451a465dc6edbc04e6f89886 Mon Sep 17 00:00:00 2001 From: adv Date: Wed, 18 Sep 2013 13:53:28 +0000 Subject: [PATCH] Minor corrections. --- src/HYDROGUI/HYDROGUI_CalculationOp.cxx | 11 +++++++---- src/HYDROGUI/HYDROGUI_ColorWidget.h | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) 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: -- 2.39.2