]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Implement UpdateView() method
authorvsr <vsr@opencascade.com>
Fri, 27 Oct 2006 12:38:33 +0000 (12:38 +0000)
committervsr <vsr@opencascade.com>
Fri, 27 Oct 2006 12:38:33 +0000 (12:38 +0000)
src/SALOME_SWIG/SALOMEGUI_Swig.cxx
src/SALOME_SWIG/SALOMEGUI_Swig.hxx
src/SALOME_SWIG/SALOMEGUI_Swig.i

index 9f8e1e20cdbe2e1de53d7c16d4b876294b6653a5..99195e10a8a67144f5807f3db44a07160cc99db4 100644 (file)
@@ -569,3 +569,25 @@ bool SALOMEGUI_Swig::IsInCurrentView( const char* theEntry )
 {
   return ProcessEvent( new TIsInViewerEvent( theEntry ) );
 }
+
+/*!
+  Updates (repaint) current view
+*/
+void SALOMEGUI_Swig::UpdateView()
+{
+  class TEvent: public SALOME_Event {
+  public:
+    TEvent() {}
+    virtual void Execute() {
+      if ( SalomeApp_Application* anApp = getApplication() ) {
+       SUIT_ViewWindow* window = anApp->desktop()->activeWindow();
+       if ( window ) {
+         SALOME_View* view = dynamic_cast<SALOME_View*>( window->getViewManager()->getViewModel() );
+         if ( view )
+           view->Repaint();
+       }
+      }
+    }
+  };
+  ProcessVoidEvent( new TEvent() );
+}
index 456211227b3359593c5b8fecbd1917f524b4d8b5..c8777842ee615f74a3a25dd4ba4153e6a400baec 100644 (file)
@@ -60,6 +60,7 @@ public:
   void             DisplayAll();
   void             EraseAll();
   bool             IsInCurrentView( const char *Entry );
+  void             UpdateView();
 
   /* get component name/username */
   const char*      getComponentName( const char* ComponentUserName );
index 7820811c93600675388a1f1c83ee28034f78579f..2d3a87a44f551fa69e26c4502fbb6b24ff439ce5 100644 (file)
@@ -80,6 +80,7 @@ class SALOMEGUI_Swig
   void DisplayAll();
   void EraseAll();
   bool IsInCurrentView(const char *Entry);
+  void UpdateView();
 
 /* get component name/username */
   const char* getComponentName( const char* ComponentUserName );