Enable loading of product by double clicking in the resource explorer

- Doesn't work if radar product manager is expired for the site (time not present in record map)
- Need to fix going back to expired (garbage collected) live data
This commit is contained in:
Dan Paulat 2023-04-10 23:17:21 -05:00
parent 0c8047b1f4
commit 92bb5154a4
4 changed files with 81 additions and 7 deletions

View file

@ -307,7 +307,7 @@ std::shared_ptr<config::RadarSite> MapWidget::GetRadarSite() const
return radarSite;
}
uint16_t MapWidget::GetVcp() const
std::uint16_t MapWidget::GetVcp() const
{
auto radarProductView = p->context_->radar_product_view();
@ -317,7 +317,7 @@ uint16_t MapWidget::GetVcp() const
}
else
{
return 0;
return 0u;
}
}
@ -334,7 +334,8 @@ void MapWidget::SelectElevation(float elevation)
void MapWidget::SelectRadarProduct(common::RadarProductGroup group,
const std::string& product,
int16_t productCode)
std::int16_t productCode,
std::chrono::system_clock::time_point time)
{
bool radarProductViewCreated = false;
@ -384,8 +385,8 @@ void MapWidget::SelectRadarProduct(common::RadarProductGroup group,
if (radarProductView != nullptr)
{
// Always select the latest product available
radarProductView->SelectTime({});
// Select the time associated with the request
radarProductView->SelectTime(time);
if (radarProductViewCreated)
{