From: vsr Date: Tue, 24 Dec 2013 08:05:55 +0000 (+0000) Subject: Fix problem with wrong popup menu in SMESH module when "keyboard-free" navigation... X-Git-Tag: V7_4_0a1~31 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8c512efd277cbf6c04c1c2e0fde4fb77f85d34d0;p=modules%2Fgui.git Fix problem with wrong popup menu in SMESH module when "keyboard-free" navigation mode is switched on --- diff --git a/src/SVTK/SVTK_RenderWindowInteractor.cxx b/src/SVTK/SVTK_RenderWindowInteractor.cxx index 6301ece1d..c7b9f5efc 100644 --- a/src/SVTK/SVTK_RenderWindowInteractor.cxx +++ b/src/SVTK/SVTK_RenderWindowInteractor.cxx @@ -57,6 +57,10 @@ static bool GENERATE_SUIT_EVENTS = true; static bool FOCUS_UNDER_MOUSE = false; +// workaround about the bug in vtkImplicitPlaneWidget class +// that eats mouse button release event +// causing clipping plane preview in SMESH sticking up +#define Fix_Of_vtkImplicitPlaneWidget_bug /*! Constructor @@ -293,17 +297,19 @@ QVTK_RenderWindowInteractor else if( event->button() & Qt::MidButton ) GetDevice()->MiddleButtonReleaseEvent(); else if( event->button() & Qt::RightButton ) { - #ifndef Fix_Of_vtkImplicitPlaneWidget_bug +#if defined(Fix_Of_vtkImplicitPlaneWidget_bug) GetDevice()->SetEventInformationFlipY( -99999, -99999, event->modifiers() & Qt::ControlModifier, event->modifiers() & Qt::ShiftModifier); + bool blocked = blockSignals( true ); GetDevice()->LeftButtonPressEvent(); GetDevice()->LeftButtonReleaseEvent(); + blockSignals( blocked ); GetDevice()->SetEventInformationFlipY(event->x(), event->y(), event->modifiers() & Qt::ControlModifier, event->modifiers() & Qt::ShiftModifier); - #endif +#endif GetDevice()->RightButtonReleaseEvent(); } }