From: apo Date: Thu, 10 Nov 2005 11:50:01 +0000 (+0000) Subject: Fix for Bug GVIEW10475 X-Git-Tag: BR-D5-38-2003_D2005-24-11~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=35da5c19fa70f4d246c5d3437b59ae644d43ef52;p=modules%2Fgui.git Fix for Bug GVIEW10475 flicker with point sprite representation --- 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; };