mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 20:50:06 +00:00
Refactoring refresh capability to provider manager in preparation for level 3 refresh
This commit is contained in:
parent
5cfab59977
commit
780d13cefa
3 changed files with 102 additions and 54 deletions
|
|
@ -603,13 +603,15 @@ void MapWidgetImpl::AutoRefreshConnect()
|
|||
{
|
||||
connect(
|
||||
radarProductManager_.get(),
|
||||
&manager::RadarProductManager::NewLevel2DataAvailable,
|
||||
&manager::RadarProductManager::NewDataAvailable,
|
||||
this,
|
||||
[&](std::chrono::system_clock::time_point latestTime)
|
||||
[&](common::RadarProductGroup group,
|
||||
const std::string& product,
|
||||
std::chrono::system_clock::time_point latestTime)
|
||||
{
|
||||
if (autoRefreshEnabled_ && context_->radarProductView_ != nullptr &&
|
||||
context_->radarProductView_->GetRadarProductGroup() ==
|
||||
common::RadarProductGroup::Level2)
|
||||
group == common::RadarProductGroup::Level2 &&
|
||||
context_->radarProductView_->GetRadarProductGroup() == group)
|
||||
{
|
||||
// Create file request
|
||||
std::shared_ptr<request::NexradFileRequest> request =
|
||||
|
|
@ -646,7 +648,7 @@ void MapWidgetImpl::AutoRefreshDisconnect()
|
|||
if (radarProductManager_ != nullptr)
|
||||
{
|
||||
disconnect(radarProductManager_.get(),
|
||||
&manager::RadarProductManager::NewLevel2DataAvailable,
|
||||
&manager::RadarProductManager::NewDataAvailable,
|
||||
this,
|
||||
nullptr);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue