]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
To provide save / restore Gauss Points configuration functionality
authorapo <apo@opencascade.com>
Wed, 28 Dec 2005 16:00:35 +0000 (16:00 +0000)
committerapo <apo@opencascade.com>
Wed, 28 Dec 2005 16:00:35 +0000 (16:00 +0000)
src/SVTK/SVTK_RenderWindowInteractor.cxx

index aa2a9821096c781e8d3765d4f991e6bf77d468a0..c66e0456faf79132e96dcb4ecdb9d7a95e77cfcc 100644 (file)
@@ -82,6 +82,11 @@ QVTK_RenderWindowInteractor
 
   myRenderWindow->Delete();
   myRenderWindow->DoubleBufferOn();
+
+#ifndef WNT
+  myRenderWindow->SetDisplayId((void*)x11Display());
+#endif
+  myRenderWindow->SetWindowId((void*)winId());
 }
 
 
@@ -150,11 +155,10 @@ QVTK_RenderWindowInteractor
 {
   // Final initialization just before the widget is displayed
   GetDevice()->SetSize(width(),height());
-#ifndef WNT
-  getRenderWindow()->SetDisplayId((void*)x11Display());
-#endif
-  getRenderWindow()->SetWindowId((void*)winId());
-  GetDevice()->Enable();
+  if(!GetDevice()->GetInitialized()){
+    GetDevice()->Initialize();
+    GetDevice()->ConfigureEvent();
+  }
 }
 
 //----------------------------------------------------------------------------
@@ -170,13 +174,7 @@ void
 QVTK_RenderWindowInteractor
 ::paintEvent( QPaintEvent* theEvent ) 
 {
-  if(GetDevice()->GetEnabled()){
-    if(!GetDevice()->GetInitialized()){
-      GetDevice()->Initialize();
-      GetDevice()->ConfigureEvent();
-    }
-    GetDevice()->Render();
-  }
+  GetDevice()->Render();
 }