From 1f1c0e4dcbab7d45bfb55661736fbcfab125772c Mon Sep 17 00:00:00 2001 From: sln Date: Tue, 23 Aug 2005 08:55:53 +0000 Subject: [PATCH] type method added --- src/SMESHGUI/SMESHGUI_Selection.cxx | 14 ++++++++++---- src/SMESHGUI/SMESHGUI_Selection.h | 1 + 2 files changed, 11 insertions(+), 4 deletions(-) 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); -- 2.39.2