]> git.mxchange.org Git - simgear.git/commitdiff
Canvas: fix distance check for click events.
authorThomas Geymayer <tomgey@gmail.com>
Sat, 29 Jun 2013 12:11:19 +0000 (14:11 +0200)
committerThomas Geymayer <tomgey@gmail.com>
Sat, 29 Jun 2013 12:11:19 +0000 (14:11 +0200)
simgear/canvas/CanvasEventManager.cxx

index a10b7c008a527721e42c681b94ff2fac2e53af95..879f869c39fc91f35cb551cfad163ff18c5f4083 100644 (file)
@@ -279,8 +279,8 @@ namespace canvas
                                     const EventPropagationPath& path2 ) const
   {
     osg::Vec2 delta = path1.front().local_pos - path2.front().local_pos;
-    return delta.x() < drag_threshold
-        && delta.y() < drag_threshold;
+    return std::fabs(delta.x()) < drag_threshold
+        && std::fabs(delta.y()) < drag_threshold;
   }
 
   //----------------------------------------------------------------------------