Skip to content

Commit

Permalink
LiveMap overlay video widget - show/hide according to Location data p…
Browse files Browse the repository at this point in the history
…resence

Fixes the LiveMap dissapering on pauses, we could refactor to move
this and similar ElevationMeter operations to Start event.
  • Loading branch information
amtriathlon committed Jun 26, 2020
1 parent e90eaf2 commit ac5ae50
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Train/VideoWindow.cpp
Expand Up @@ -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();
}
}
Expand Down

0 comments on commit ac5ae50

Please sign in to comment.