From 0e7397295f43562021756e14fb06911bf4776c86 Mon Sep 17 00:00:00 2001 From: sln Date: Wed, 24 Dec 2008 10:09:58 +0000 Subject: [PATCH] if ( e->type() == QEvent::MouseButtonRelease ) myButtonState |= me->button(); /* add release button */ added in event filter to provide proper reaction on MouseRelease event --- src/GLViewer/GLViewer_Viewer.cxx | 3 +++ 1 file changed, 3 insertions(+) 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() ) { -- 2.39.2