From ac5ae5027b958a8dac6d9e325180bb0003aaf287 Mon Sep 17 00:00:00 2001 From: Ale Martinez Date: Fri, 26 Jun 2020 16:01:16 -0300 Subject: [PATCH] LiveMap overlay video widget - show/hide according to Location data presence Fixes the LiveMap dissapering on pauses, we could refactor to move this and similar ElevationMeter operations to Start event. --- src/Train/VideoWindow.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Train/VideoWindow.cpp b/src/Train/VideoWindow.cpp index 3187661e22..0445feb87c 100644 --- a/src/Train/VideoWindow.cpp +++ b/src/Train/VideoWindow.cpp @@ -362,6 +362,9 @@ void VideoWindow::telemetryUpdate(RealtimeData rtd) double dLon = rtd.getLongitude(); if (dLat && dLon) liveMapWidget->plotNewLatLng(dLat, dLon); + + // show/hide depending on Location data presence + if (context->currentErgFile() && context->currentErgFile()->gpi.HasLocation()) liveMapWidget->show(); else liveMapWidget->hide(); } }