From 6db56e8f273bc3e03088057327788b461a32a768 Mon Sep 17 00:00:00 2001 From: Torsten Dreyer Date: Wed, 22 Dec 2010 08:34:44 +0100 Subject: [PATCH] Bugfix: Immediately fetch METAR on reenabling of "Live data" If "Live data" was disabled in any way in the global-weather dialog and reenabled later, the next metar fetch occoured only after up to 15 minutes after the report expired. This patch triggers triggers an immediate fetch of a metar after enabling live data. --- src/Environment/realwx_ctrl.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Environment/realwx_ctrl.cxx b/src/Environment/realwx_ctrl.cxx index 4631b0c52..cd315eea5 100644 --- a/src/Environment/realwx_ctrl.cxx +++ b/src/Environment/realwx_ctrl.cxx @@ -215,6 +215,7 @@ void NoaaMetarRealWxController::update( bool first, double dt ) bool valid = _metarValidNode->getBoolValue(); string stationId = valid ? _metarStationIdNode->getStringValue() : ""; + if( first ) _metarTimeToLive = 0.0; if( _metarTimeToLive <= 0.0 ) { valid = false;