From: asl Date: Thu, 7 Jul 2005 09:07:10 +0000 (+0000) Subject: There were added new version of method type returning type by string entry X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=eaeda2a220fdf8d71e8ed1970e4aea695e0fe035;p=modules%2Fsmesh.git There were added new version of method type returning type by string entry --- diff --git a/src/SMESHGUI/SMESHGUI_Selection.cxx b/src/SMESHGUI/SMESHGUI_Selection.cxx index 5a060f295..912d1a0d4 100644 --- a/src/SMESHGUI/SMESHGUI_Selection.cxx +++ b/src/SMESHGUI/SMESHGUI_Selection.cxx @@ -313,17 +313,21 @@ QVariant SMESHGUI_Selection::isVisible( int ind ) const return QVariant( false, 0 ); } +//======================================================================= +//function : type +//purpose : +//======================================================================= +int SMESHGUI_Selection::type( SalomeApp_DataOwner* owner, _PTR(Study) study ) +{ + return type( owner->entry(), study ); +} //======================================================================= //function : type //purpose : //======================================================================= - -int SMESHGUI_Selection::type( SalomeApp_DataOwner* owner, - _PTR(Study) study ) +int SMESHGUI_Selection::type( const QString& entry, _PTR(Study) study ) { - QString entry = owner->entry(); - _PTR(SObject) obj (study->FindObjectID(entry.latin1())); if( !obj ) return -1; diff --git a/src/SMESHGUI/SMESHGUI_Selection.h b/src/SMESHGUI/SMESHGUI_Selection.h index 7137ebaef..7fccc4e9b 100644 --- a/src/SMESHGUI/SMESHGUI_Selection.h +++ b/src/SMESHGUI/SMESHGUI_Selection.h @@ -63,7 +63,8 @@ public: SMESH_Actor* getActor( int ind ) const; - static int type( SalomeApp_DataOwner* owner, _PTR(Study) study); + static int type( const QString&, _PTR(Study) ); + static int type( SalomeApp_DataOwner* owner, _PTR(Study) ); static QString typeName( const int type); private: