From 470dc1b363231c0a45c90084a9d8edff046866c2 Mon Sep 17 00:00:00 2001 From: mfranz Date: Wed, 15 Feb 2006 08:15:28 +0000 Subject: [PATCH] geo coords on button *down*. Noise reduction. --- src/Input/input.cxx | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/Input/input.cxx b/src/Input/input.cxx index bd8ee9d01..37820e1ba 100644 --- a/src/Input/input.cxx +++ b/src/Input/input.cxx @@ -319,7 +319,7 @@ FGInput::doMouseClick (int b, int updown, int x, int y) // and be happy. FGScenery* scenery = globals->get_scenery(); sgdVec3 start, dir, hit; - if (updown && FGRenderer::getPickInfo(start, dir, x, y) && + if (MOUSE_BUTTON_DOWN && FGRenderer::getPickInfo(start, dir, x, y) && scenery->get_cart_ground_intersection(start, dir, hit)) { Point3D geod = sgCartToGeod(Point3D(hit[0], hit[1], hit[2])); @@ -337,13 +337,6 @@ FGInput::doMouseClick (int b, int updown, int x, int y) lat->setDoubleValue(geod.lat() * SGD_RADIANS_TO_DEGREES); elev_m->setDoubleValue(geod.elev()); elev_ft->setDoubleValue(geod.elev() * SG_METER_TO_FEET); - - // std::cout << "lon = " << geod.lon()*SGD_RADIANS_TO_DEGREES - // << " deg, lat = " << geod.lat()*SGD_RADIANS_TO_DEGREES - // << " deg, elev = " << geod.elev() - // << " m" << std::endl; - } else { - std::cout << "Cannot find intersection point" << std::endl; } } }