From: sln Date: Wed, 24 Dec 2008 10:09:58 +0000 (+0000) Subject: if ( e->type() == QEvent::MouseButtonRelease ) X-Git-Tag: CTH_141~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0e7397295f43562021756e14fb06911bf4776c86;p=modules%2Fgui.git if ( e->type() == QEvent::MouseButtonRelease ) myButtonState |= me->button(); /* add release button */ added in event filter to provide proper reaction on MouseRelease event --- diff --git a/src/GLViewer/GLViewer_Viewer.cxx b/src/GLViewer/GLViewer_Viewer.cxx index bd2d28f11..da6e8ac61 100644 --- a/src/GLViewer/GLViewer_Viewer.cxx +++ b/src/GLViewer/GLViewer_Viewer.cxx @@ -656,6 +656,9 @@ bool GLViewer_ViewTransformer::eventFilter( QObject* o, QEvent* e ) if ( e->type() == QEvent::MouseButtonPress ) myButtonState |= me->button(); /* add pressed button */ + if ( e->type() == QEvent::MouseButtonRelease ) + myButtonState |= me->button(); /* add release button */ + int mouseOnlyState = ( myButtonState & ( Qt::LeftButton | Qt::MidButton | Qt::RightButton ) ); if ( myStart.isNull() ) {