From bc5e6135d17a8e1de00946b675618c1e181008f1 Mon Sep 17 00:00:00 2001 From: rnv Date: Wed, 4 Oct 2017 10:47:04 +0300 Subject: [PATCH] Implement UdateActor method. --- src/SMESH_SWIG_WITHIHM/libSMESH_Swig.cxx | 19 +++++++++++++++++++ src/SMESH_SWIG_WITHIHM/libSMESH_Swig.h | 2 ++ src/SMESH_SWIG_WITHIHM/libSMESH_Swig.i | 1 + 3 files changed, 22 insertions(+) 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 ); -- 2.39.2