From: sln Date: Tue, 23 Aug 2005 08:55:53 +0000 (+0000) Subject: type method added X-Git-Tag: T_3_0_2a1~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1f1c0e4dcbab7d45bfb55661736fbcfab125772c;p=modules%2Fsmesh.git type method added --- diff --git a/src/SMESHGUI/SMESHGUI_Selection.cxx b/src/SMESHGUI/SMESHGUI_Selection.cxx index fe962f55e..014e88a5a 100644 --- a/src/SMESHGUI/SMESHGUI_Selection.cxx +++ b/src/SMESHGUI/SMESHGUI_Selection.cxx @@ -316,16 +316,22 @@ QVariant SMESHGUI_Selection::isVisible( int ind ) const } +//======================================================================= +//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..524aa26a2 100644 --- a/src/SMESHGUI/SMESHGUI_Selection.h +++ b/src/SMESHGUI/SMESHGUI_Selection.h @@ -63,6 +63,7 @@ public: SMESH_Actor* getActor( int ind ) const; + static int type( const QString&, _PTR(Study) ); static int type( SalomeApp_DataOwner* owner, _PTR(Study) study); static QString typeName( const int type);