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

Dennis Nienhüser earthwings at gentoo.org
Wed Jun 2 22:27:59 CEST 2010


SVN commit 1133911 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
Fix minor logic error introduced in rev. 1132367.
Backport of commits 1132367 and 1133908


 M  +3 -4      MarbleWidgetInputHandler.cpp  


--- branches/KDE/4.5/kdeedu/marble/src/lib/MarbleWidgetInputHandler.cpp #1133910:1133911
@@ -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