]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
if ( e->type() == QEvent::MouseButtonRelease )
authorsln <sln@opencascade.com>
Wed, 24 Dec 2008 10:09:58 +0000 (10:09 +0000)
committersln <sln@opencascade.com>
Wed, 24 Dec 2008 10:09:58 +0000 (10:09 +0000)
                myButtonState |= me->button();  /* add release button */

added in event filter to provide proper reaction on MouseRelease event

src/GLViewer/GLViewer_Viewer.cxx

index bd2d28f11d5a097d259d6dae5d7166894a9ba619..da6e8ac6158ca00a4994d3151d759886ee1f97d5 100644 (file)
@@ -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() )
             {