From f6e265f826934d245f344127ffadf8aa0c1f716c Mon Sep 17 00:00:00 2001 From: apo Date: Fri, 24 Nov 2006 16:55:28 +0000 Subject: [PATCH] Minor changes --- src/VISUGUI/VisuGUI_Prs3dTools.h | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/src/VISUGUI/VisuGUI_Prs3dTools.h b/src/VISUGUI/VisuGUI_Prs3dTools.h index acac49e6..12b5523b 100644 --- a/src/VISUGUI/VisuGUI_Prs3dTools.h +++ b/src/VISUGUI/VisuGUI_Prs3dTools.h @@ -99,8 +99,9 @@ namespace VISU } } + + //---------------------------------------------------------------------------- template - inline void EditPrs3d(VisuGUI* theModule, Handle(SALOME_InteractiveObject)& theIO, @@ -116,9 +117,9 @@ namespace VISU } } + //--------------------------------------------------------------- template - inline TPrs3d_i* CreatePrs3dFromFactory(VisuGUI* theModule, _PTR(SObject) theTimeStamp, @@ -159,7 +160,6 @@ namespace VISU //--------------------------------------------------------------- template - inline TPrs3d_i* CreateAndEditPrs3d(VisuGUI* theModule, _PTR(SObject) theTimeStamp, @@ -240,7 +240,6 @@ namespace VISU //--------------------------------------------------------------- template - inline void CreatePrs3dInViewer(VisuGUI* theModule, _PTR(SObject) theTimeStampSObj, @@ -259,8 +258,9 @@ namespace VISU theModule->application()->putInfo(QObject::tr("INF_DONE")); } + + //---------------------------------------------------------------------------- template - inline void CreatePrs3d(VisuGUI* theModule, const QString& theDesiredViewerType = QString()) @@ -298,6 +298,25 @@ namespace VISU } } } + + + //---------------------------------------------------------------------------- + VISU::Prs3d_i* + GetPrs3d(CORBA::Object_ptr theObject) + { + if(!CORBA::is_nil(theObject)){ + VISU::Base_var aBase = VISU::Base::_narrow(theObject); + if(!CORBA::is_nil(aBase)){ + PortableServer::ServantBase_var aServant = VISU::GetServant(aBase); + if(aServant.in()) + return dynamic_cast(aServant.in()); + } + } + return NULL; + } + + + //---------------------------------------------------------------------------- } #endif -- 2.39.2