From: rnv Date: Wed, 4 Oct 2017 07:47:04 +0000 (+0300) Subject: Implement UdateActor method. X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=43cb8b7cf45ee2f001516eda685e0d7d22c7365f;p=modules%2Fsmesh.git Implement UdateActor method. --- diff --git a/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.cxx b/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.cxx index f9527fbb8..f8a61b766 100644 --- a/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.cxx +++ b/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.cxx @@ -684,6 +684,25 @@ void SMESH_Swig::EraseActor( const char* Mesh_Entry, const bool allViewers ) ProcessVoidEvent(new TEvent(Mesh_Entry, allViewers)); } +void SMESH_Swig::UpdateActor( const char* Mesh_Entry ) { + class TEvent: public SALOME_Event + { + private: + const char* _entry; + public: + TEvent( const char* Mesh_Entry ) { + _entry = Mesh_Entry; + } + virtual void Execute() { + Handle(SALOME_InteractiveObject) anIO = new SALOME_InteractiveObject + ( _entry, "SMESH", "" ); + SMESH::Update( anIO, true ); + } + }; + + ProcessVoidEvent( new TEvent(Mesh_Entry) ); +} + void SMESH_Swig::SetName(const char* theEntry, const char* theName) { diff --git a/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.h b/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.h index f6cde6948..654c3e699 100644 --- a/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.h +++ b/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.h @@ -89,6 +89,8 @@ public: void EraseActor( const char*, const bool allViewers = false ); + void UpdateActor( const char* Mesh_Entry ); + /*! * \brief Set mesh icon according to compute status * \param Mesh_Entry - entry of a mesh diff --git a/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.i b/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.i index 5f66f9f21..68b0e1ec5 100644 --- a/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.i +++ b/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.i @@ -101,6 +101,7 @@ class SMESH_Swig void CreateAndDisplayActor( const char* Mesh_Entry ); void EraseActor( const char* Mesh_Entry, const bool allViewers = false ); + void UpdateActor( const char* Mesh_Entry ); void setSelectionMode( SelectionMode selectionMode); std::vector getSelected( const char* Mesh_Entry );