mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 17:30:05 +00:00
Check for product availability on radar site change.
This commit is contained in:
parent
befa5f3ded
commit
4ab4a8825b
2 changed files with 116 additions and 4 deletions
|
|
@ -230,6 +230,7 @@ public:
|
|||
const std::string radarId_;
|
||||
bool initialized_;
|
||||
bool level3ProductsInitialized_;
|
||||
bool level3AvailabilityReady_ {false};
|
||||
|
||||
std::shared_ptr<config::RadarSite> radarSite_;
|
||||
std::size_t cacheLimit_ {6u};
|
||||
|
|
@ -1585,6 +1586,12 @@ void RadarProductManager::UpdateAvailableProducts()
|
|||
|
||||
if (p->level3ProductsInitialized_)
|
||||
{
|
||||
if (p->level3AvailabilityReady_)
|
||||
{
|
||||
// Multiple maps may use the same manager, so this ensures that all get
|
||||
// notified of the change
|
||||
Q_EMIT Level3ProductsChanged();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1660,6 +1667,7 @@ void RadarProductManagerImpl::UpdateAvailableProductsSync()
|
|||
}
|
||||
}
|
||||
|
||||
level3AvailabilityReady_ = true;
|
||||
Q_EMIT self_->Level3ProductsChanged();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue