mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 16:30:05 +00:00
Don't display a requested product if a different product has since been selected
This commit is contained in:
parent
a87453ed2e
commit
fc194e0f17
1 changed files with 8 additions and 2 deletions
|
|
@ -929,12 +929,18 @@ void MapWidgetImpl::RadarProductManagerConnect()
|
||||||
request.get(),
|
request.get(),
|
||||||
&request::NexradFileRequest::RequestComplete,
|
&request::NexradFileRequest::RequestComplete,
|
||||||
this,
|
this,
|
||||||
[this](std::shared_ptr<request::NexradFileRequest> request)
|
[=,
|
||||||
|
this](std::shared_ptr<request::NexradFileRequest> request)
|
||||||
{
|
{
|
||||||
// Select loaded record
|
// Select loaded record
|
||||||
auto record = request->radar_product_record();
|
auto record = request->radar_product_record();
|
||||||
|
|
||||||
if (record != nullptr)
|
// Validate record, and verify current map context still
|
||||||
|
// displays product
|
||||||
|
if (record != nullptr &&
|
||||||
|
context_->radar_product_group() == group &&
|
||||||
|
(group == common::RadarProductGroup::Level2 ||
|
||||||
|
context_->radar_product() == product))
|
||||||
{
|
{
|
||||||
widget_->SelectRadarProduct(record);
|
widget_->SelectRadarProduct(record);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue