[Marble-commits] KDE/kdeedu/marble/src/lib

Dennis Nienhüser earthwings at gentoo.org
Sun May 30 16:44:27 CEST 2010


SVN commit 1132367 by nienhueser:

Don't leave the method early when no drag operation happens: The cursor shape still needs to be adjusted.
Needs regression testing and a backport to 4.5 and 4.4 afterwards.
CCBUG: 239056

 M  +3 -4      MarbleWidgetInputHandler.cpp  


--- trunk/KDE/kdeedu/marble/src/lib/MarbleWidgetInputHandler.cpp #1132366:1132367
@@ -429,7 +429,6 @@
          || e->type() == QEvent::MouseButtonPress
          || e->type() == QEvent::MouseButtonRelease )
     {
-
         QMouseEvent *event = static_cast<QMouseEvent*>( e );
         QRegion activeRegion = MarbleWidgetInputHandler::d->m_widget->activeRegion();
 
@@ -587,9 +586,8 @@
                 int deltax = event->x() - d->m_leftpressedx;
                 int deltay = event->y() - d->m_leftpressedy;
 
-                if ( abs( deltax ) <= d->m_dragThreshold
-                     && abs( deltay ) <= d->m_dragThreshold )
-                    return true;
+                if ( abs( deltax ) > d->m_dragThreshold
+                     && abs( deltay ) > d->m_dragThreshold ) {
 
                 qreal direction = 1;
                 // Choose spin direction by taking into account whether we
@@ -614,6 +612,7 @@
                                                                  RAD2DEG * ( qreal )( d->m_leftpressedb )
                                                                  + 90.0 * deltay / radius );
             }
+            }
 
 
             if ( d->m_midpressed ) {


More information about the Marble-commits mailing list