- aCalculObj->SetName( anObjectName );
-
- QStringList aRefObjectNames = aPanel->getSelectedGeomObjects();
- HYDROData_SequenceOfObjects aGeomObjects =
- HYDROGUI_Tool::FindObjectsByNames( module(), aRefObjectNames );
+ //QString anObjectName = aPanel->getObjectName().simplified();
+ //if ( anObjectName.isEmpty() )
+ //{
+ // theErrorMsg = tr( "INCORRECT_OBJECT_NAME" );
+ // return false;
+ //}
+
+ //// check that there are no other objects with the same name in the document
+ //if( !myIsEdit || ( !myEditedObject.IsNull() && myEditedObject->GetName() != anObjectName ) )
+ //{
+ // Handle(HYDROData_Entity) anObject = HYDROGUI_Tool::FindObjectByName( module(), anObjectName );
+ // if ( !anObject.IsNull() )
+ // {
+ // theErrorMsg = tr( "OBJECT_EXISTS_IN_DOCUMENT" ).arg( anObjectName );
+ // return false;
+ // }
+ //}
+
+ //Handle(HYDROData_Document) aDocument = doc();
+
+ //Handle(HYDROData_CalculationCase) aCalculObj = myIsEdit ? myEditedObject :
+ // Handle(HYDROData_CalculationCase)::DownCast( aDocument->CreateObject( KIND_CALCULATION ) );
+ //if ( aCalculObj.IsNull() )
+ // return false;
+
+ //aCalculObj->SetName( anObjectName );
+
+ //QStringList aRefObjectNames = aPanel->getSelectedGeomObjects();
+ //HYDROData_SequenceOfObjects aGeomObjects =
+ // HYDROGUI_Tool::FindObjectsByNames( module(), aRefObjectNames );