From ffccd77f4729d3348371eafea278a0c8cc2adb5f Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 6 Jul 2005 11:22:01 +0000 Subject: [PATCH] PAL9199. add SetMeshIcon() --- src/SMESHGUI/SMESHGUI_Swig.cxx | 22 ++++++++++++++++++---- src/SMESHGUI/SMESHGUI_Swig.hxx | 2 ++ src/SMESHGUI/SMESHGUI_Swig.i | 2 ++ 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/SMESHGUI/SMESHGUI_Swig.cxx b/src/SMESHGUI/SMESHGUI_Swig.cxx index b82c7b32a..d0dd51fc0 100644 --- a/src/SMESHGUI/SMESHGUI_Swig.cxx +++ b/src/SMESHGUI/SMESHGUI_Swig.cxx @@ -28,6 +28,7 @@ using namespace std; #include "SMESHGUI_Swig.hxx" +#include "SMESHGUI_Utils.h" #include "Utils_ORB_INIT.hxx" #include "Utils_SINGLETON.hxx" @@ -50,10 +51,10 @@ using namespace std; static CORBA::ORB_var _orb; -static char* ObjectToString (CORBA::Object_ptr obj) -{ - return _orb->object_to_string(obj); -} +// static char* ObjectToString (CORBA::Object_ptr obj) +// { +// return _orb->object_to_string(obj); +// } static CORBA::Object_ptr StringToObject (const char* ior) { @@ -451,3 +452,16 @@ void SMESH_Swig::setOrb() } ASSERT(! CORBA::is_nil(_orb)); } + +//======================================================================= +//function : SetMeshIcon +//purpose : +//======================================================================= + +void SMESH_Swig::SetMeshIcon(const char* Mesh_Entry, const bool isComputed) +{ + SALOMEDS::SObject_var mesh = myStudy->FindObjectID( Mesh_Entry ); + if ( !mesh->_is_nil() ) + SMESH::ModifiedMesh( mesh, isComputed ); +} + diff --git a/src/SMESHGUI/SMESHGUI_Swig.hxx b/src/SMESHGUI/SMESHGUI_Swig.hxx index 860096e79..68a69299c 100644 --- a/src/SMESHGUI/SMESHGUI_Swig.hxx +++ b/src/SMESHGUI/SMESHGUI_Swig.hxx @@ -63,6 +63,8 @@ public: void SetName(const char* Entry, const char* Name); + void SetMeshIcon(const char* Mesh_Entry, const bool isComputed); + private: SALOMEDS::Study_var myStudy; SALOMEDS::StudyBuilder_var myStudyBuilder; diff --git a/src/SMESHGUI/SMESHGUI_Swig.i b/src/SMESHGUI/SMESHGUI_Swig.i index dd6e50d15..2a99fe192 100644 --- a/src/SMESHGUI/SMESHGUI_Swig.i +++ b/src/SMESHGUI/SMESHGUI_Swig.i @@ -55,4 +55,6 @@ class SMESH_Swig const char* AddSubMeshOnShape (const char* Mesh_Entry, const char* GeomShape_Entry, const char* SM_IOR, int ST); void SetName(const char* Entry, const char* Name); + + void SetMeshIcon(const char* Mesh_Entry, const bool isComputed); }; -- 2.39.2