const QString& theName,
const ObjectKind theObjectKind )
{
+ Handle(HYDROData_Entity) aResObj;
+
Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( theModule->getStudyId() );
- return HYDROData_Tool::FindObjectByName( aDocument, theName, theObjectKind );
+ if ( !aDocument.IsNull() )
+ aResObj = aDocument->FindObjectByName( theName, theObjectKind );
+
+ return aResObj;
}
HYDROData_SequenceOfObjects HYDROGUI_Tool::FindObjectsByNames( HYDROGUI_Module* theModule,
const QStringList& theNames,
const ObjectKind theObjectKind )
{
+ HYDROData_SequenceOfObjects aResSeq;
+
Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( theModule->getStudyId() );
- return HYDROData_Tool::FindObjectsByNames( aDocument, theNames, theObjectKind );
+ if ( !aDocument.IsNull() )
+ aResSeq = aDocument->FindObjectsByNames( theNames, theObjectKind );
+
+ return aResSeq;
}
QString HYDROGUI_Tool::GenerateObjectName( HYDROGUI_Module* theModule,
{
const QString& aZoneName = aZoneNameIter.next();
Handle(HYDROData_ImmersibleZone) aRefZone =
- Handle(HYDROData_ImmersibleZone)::DownCast(
- HYDROData_Tool::FindObjectByName( theDoc, aZoneName, KIND_IMMERSIBLE_ZONE ) );
+ Handle(HYDROData_ImmersibleZone)::DownCast( theDoc->FindObjectByName( aZoneName, KIND_IMMERSIBLE_ZONE ) );
if( !aRefZone.IsNull() )
{
QColor aRefColor = aRefZone->GetFillingColor();