Salome HOME
Merge branch 'occ/shaper2smesh'
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_VTKUtils.cxx
index a8564b42e4f4899b1ec358f236d4316ab2217ae3..fe5b138dcb36fd6dbb84a34a71db63488d259c51 100644 (file)
@@ -289,6 +289,29 @@ namespace SMESH
     return;
   }
 
     return;
   }
 
+  //================================================================================
+  /*!
+   * \brief Remove/update actors while module activation
+   *
+   * At module activation, groups and sub-meshes can be removed on engine side due
+   * to modification of meshed geometry, while their actors can remain.
+   * Here we remove/update SMESH_Actor's of changed objects. State (emptiness) of objects
+   * is defined by their icons in the Object Browser
+   */
+  //================================================================================
+
+  void UpdateActorsAfterUpdateStudy()
+  {
+    SUIT_Study* study = SMESH::GetActiveStudy();
+    if ( SUIT_Desktop* desk = study->application()->desktop() )
+    {
+      QList<SUIT_ViewWindow*> wndList = desk->windows();
+      SUIT_ViewWindow* wnd;
+      foreach ( wnd, wndList )
+        SMESH::UpdateActorsAfterUpdateStudy(wnd);
+    }
+  }
+
   //================================================================================
   /*!
    * \brief Notify the user on problems during visualization
   //================================================================================
   /*!
    * \brief Notify the user on problems during visualization