From 35da5c19fa70f4d246c5d3437b59ae644d43ef52 Mon Sep 17 00:00:00 2001 From: apo Date: Thu, 10 Nov 2005 11:50:01 +0000 Subject: [PATCH] Fix for Bug GVIEW10475 flicker with point sprite representation --- src/SVTK/SVTK_MainWindow.cxx | 1 + src/SVTK/SVTK_RenderWindowInteractor.cxx | 17 ++--------------- src/SVTK/SVTK_RenderWindowInteractor.h | 1 - 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/src/SVTK/SVTK_MainWindow.cxx b/src/SVTK/SVTK_MainWindow.cxx index f1b6867d9..c5e260cd7 100644 --- a/src/SVTK/SVTK_MainWindow.cxx +++ b/src/SVTK/SVTK_MainWindow.cxx @@ -84,6 +84,7 @@ SVTK_MainWindow SetEventDispatcher(myInteractor->GetDevice()); setCentralWidget(myInteractor); + myInteractor->setBackgroundMode(Qt::NoBackground); myInteractor->setFocusPolicy(StrongFocus); myInteractor->setFocus(); diff --git a/src/SVTK/SVTK_RenderWindowInteractor.cxx b/src/SVTK/SVTK_RenderWindowInteractor.cxx index 000d592f2..ecf0dda1d 100644 --- a/src/SVTK/SVTK_RenderWindowInteractor.cxx +++ b/src/SVTK/SVTK_RenderWindowInteractor.cxx @@ -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() - "<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(); } diff --git a/src/SVTK/SVTK_RenderWindowInteractor.h b/src/SVTK/SVTK_RenderWindowInteractor.h index 4d7e6ca95..bc0020ddf 100644 --- a/src/SVTK/SVTK_RenderWindowInteractor.h +++ b/src/SVTK/SVTK_RenderWindowInteractor.h @@ -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 myRenderWindow; vtkSmartPointer myDevice; }; -- 2.39.2