From eaeda2a220fdf8d71e8ed1970e4aea695e0fe035 Mon Sep 17 00:00:00 2001 From: asl Date: Thu, 7 Jul 2005 09:07:10 +0000 Subject: [PATCH] There were added new version of method type returning type by string entry --- src/SMESHGUI/SMESHGUI_Selection.cxx | 14 +++++++++----- src/SMESHGUI/SMESHGUI_Selection.h | 3 ++- 2 files changed, 11 insertions(+), 6 deletions(-) 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: -- 2.30.2