From: Thomas Geymayer Date: Sat, 29 Jun 2013 12:11:19 +0000 (+0200) Subject: Canvas: fix distance check for click events. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=36d1308aa6344ecaff56df11f556e7c4ea81040f;p=simgear.git Canvas: fix distance check for click events. --- diff --git a/simgear/canvas/CanvasEventManager.cxx b/simgear/canvas/CanvasEventManager.cxx index a10b7c00..879f869c 100644 --- a/simgear/canvas/CanvasEventManager.cxx +++ b/simgear/canvas/CanvasEventManager.cxx @@ -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; } //----------------------------------------------------------------------------