- foreach( SUIT_DataOwner* anOwner, anOwners )
- {
- LightApp_GVDataOwner* aGrDOwner = dynamic_cast<LightApp_GVDataOwner*>( anOwner );
- if( aGrDOwner )
- {
- anObjName = aGrDOwner->object()->getName();
- break;
- }
- }
- myObjName->setText( anObjName );
- */
+ Handle(HYDROData_Entity) anObject = HYDROGUI_Tool::GetSelectedObject( myModule );
+ if( !anObject.IsNull() )
+ if( myObjectKind == KIND_UNKNOWN || myObjectKind == anObject->GetKind() )
+ anObjName = anObject->GetName();
+
+ SetName( anObjName );
+}
+
+void HYDROGUI_ObjSelector::SetName( const QString& theName )
+{
+ myObjName->setText( theName );