From: apo Date: Fri, 3 Feb 2006 11:55:18 +0000 (+0000) Subject: To set focus to the corresponding view window on mouse wheel event X-Git-Tag: T_merge_to_HEAD_20060207~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8a089bc3194576e971a18506eb06c26cbbe4933c;p=modules%2Fgui.git To set focus to the corresponding view window on mouse wheel event --- diff --git a/src/SVTK/SVTK_RenderWindowInteractor.cxx b/src/SVTK/SVTK_RenderWindowInteractor.cxx index 27bad5b58..a2b8aa176 100644 --- a/src/SVTK/SVTK_RenderWindowInteractor.cxx +++ b/src/SVTK/SVTK_RenderWindowInteractor.cxx @@ -266,7 +266,10 @@ QVTK_RenderWindowInteractor void QVTK_RenderWindowInteractor ::wheelEvent( QWheelEvent* event ) -{} +{ + setActiveWindow(); + setFocus(); +} //---------------------------------------------------------------------------- @@ -615,6 +618,7 @@ SVTK_RenderWindowInteractor ::wheelEvent( QWheelEvent* event ) { QVTK_RenderWindowInteractor::wheelEvent(event); + if(event->delta() > 0) GetDevice()->InvokeEvent(SVTK::ZoomInEvent,NULL); else