]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Fix for Bug GVIEW10475
authorapo <apo@opencascade.com>
Thu, 10 Nov 2005 11:50:01 +0000 (11:50 +0000)
committerapo <apo@opencascade.com>
Thu, 10 Nov 2005 11:50:01 +0000 (11:50 +0000)
flicker with point sprite representation

src/SVTK/SVTK_MainWindow.cxx
src/SVTK/SVTK_RenderWindowInteractor.cxx
src/SVTK/SVTK_RenderWindowInteractor.h

index f1b6867d91dfe23cbb8962ff1bc4dc9d42d370c8..c5e260cd75995ce3e032cadada5ecd72359e6b06 100644 (file)
@@ -84,6 +84,7 @@ SVTK_MainWindow
   SetEventDispatcher(myInteractor->GetDevice());
 
   setCentralWidget(myInteractor);
+  myInteractor->setBackgroundMode(Qt::NoBackground);
 
   myInteractor->setFocusPolicy(StrongFocus);
   myInteractor->setFocus();
index 000d592f2ff522c7707285b05770a26c35162bd3..ecf0dda1d26d65f55f337e6277ef5b182ab02f7b 100644 (file)
@@ -68,16 +68,14 @@ static int MYVTKDEBUG = 0;
 #endif
 
 static bool GENERATE_SUIT_EVENTS = false;
-static bool FOCUS_UNDER_MOUSE = false;
 
 
 //----------------------------------------------------------------------------
 QVTK_RenderWindowInteractor
 ::QVTK_RenderWindowInteractor(QWidget* theParent, 
                              const char* theName):
-  QWidget(theParent,theName),
-  myRenderWindow(vtkRenderWindow::New()),
-  myPreviousFocusWidget(NULL)
+  QWidget(theParent,theName,Qt::WNoAutoErase),
+  myRenderWindow(vtkRenderWindow::New())
 {
   if(MYDEBUG) INFOS("QVTK_RenderWindowInteractor() - "<<this);
   setMouseTracking(true);
@@ -226,9 +224,6 @@ void
 QVTK_RenderWindowInteractor
 ::mouseMoveEvent( QMouseEvent* event ) 
 {
-  if(FOCUS_UNDER_MOUSE && qApp->focusWidget() != this)
-    setFocus();
-
   GetDevice()->SetEventInformationFlipY(event->x(), 
                                        event->y(),
                                        event->state() & ControlButton,
@@ -317,11 +312,6 @@ void
 QVTK_RenderWindowInteractor
 ::enterEvent( QEvent* event )
 {
-  if(false && qApp->focusWidget() != this)
-    myPreviousFocusWidget = qApp->focusWidget();
-
-  QWidget::setFocus();
-
   GetDevice()->EnterEvent();
 }
 
@@ -330,9 +320,6 @@ void
 QVTK_RenderWindowInteractor
 ::leaveEvent( QEvent * )
 {
-  if(false && myPreviousFocusWidget)
-    myPreviousFocusWidget->setFocus();
-
   GetDevice()->LeaveEvent();
 }
 
index 4d7e6ca95b863562fcec533ae8d67ec6e71e8b55..bc0020ddf9a447880cad9e208dd97dae40dfd219 100644 (file)
@@ -119,7 +119,6 @@ class SVTK_EXPORT QVTK_RenderWindowInteractor: public QWidget
   //! To handle native X11 events (from such devices as SpaceMouse)
   virtual bool x11Event( XEvent *e );
 
-  QWidget* myPreviousFocusWidget;
   vtkSmartPointer<vtkRenderWindow> myRenderWindow;
   vtkSmartPointer<vtkGenericRenderWindowInteractor> myDevice;
 };