mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 14:00:06 +00:00
Don't update a radar product view when the timeline manager will issue a subsequent update
This commit is contained in:
parent
bce4c1bfb2
commit
16e3d1533f
3 changed files with 14 additions and 6 deletions
|
|
@ -793,6 +793,8 @@ void MainWindowImpl::ConnectOtherSignals()
|
|||
{
|
||||
map->SetMapLocation(latitude, longitude, true);
|
||||
}
|
||||
|
||||
UpdateRadarSite();
|
||||
},
|
||||
Qt::QueuedConnection);
|
||||
connect(mainWindow_,
|
||||
|
|
@ -810,6 +812,8 @@ void MainWindowImpl::ConnectOtherSignals()
|
|||
{
|
||||
map->SelectRadarSite(selectedRadarSite);
|
||||
}
|
||||
|
||||
UpdateRadarSite();
|
||||
});
|
||||
connect(updateManager_.get(),
|
||||
&manager::UpdateManager::UpdateAvailable,
|
||||
|
|
|
|||
|
|
@ -359,7 +359,8 @@ void MapWidget::SelectElevation(float elevation)
|
|||
void MapWidget::SelectRadarProduct(common::RadarProductGroup group,
|
||||
const std::string& product,
|
||||
std::int16_t productCode,
|
||||
std::chrono::system_clock::time_point time)
|
||||
std::chrono::system_clock::time_point time,
|
||||
bool update)
|
||||
{
|
||||
bool radarProductViewCreated = false;
|
||||
|
||||
|
|
@ -420,7 +421,7 @@ void MapWidget::SelectRadarProduct(common::RadarProductGroup group,
|
|||
common::GetLevel3Palette(productCode);
|
||||
p->InitializeNewRadarProductView(palette);
|
||||
}
|
||||
else
|
||||
else if (update)
|
||||
{
|
||||
radarProductView->Update();
|
||||
}
|
||||
|
|
@ -487,7 +488,8 @@ void MapWidget::SelectRadarSite(std::shared_ptr<config::RadarSite> radarSite,
|
|||
SelectRadarProduct(radarProductView->GetRadarProductGroup(),
|
||||
radarProductView->GetRadarProductName(),
|
||||
0,
|
||||
radarProductView->selected_time());
|
||||
radarProductView->selected_time(),
|
||||
false);
|
||||
}
|
||||
|
||||
AddLayers();
|
||||
|
|
|
|||
|
|
@ -54,12 +54,14 @@ public:
|
|||
* @param [in] group Radar product group
|
||||
* @param [in] product Radar product name
|
||||
* @param [in] productCode Radar product code (optional)
|
||||
* @paran [in] time Product time. Default is the latest available.
|
||||
* @param [in] time Product time. Default is the latest available.
|
||||
* @param [in] update Whether to update the radar product view on selection
|
||||
*/
|
||||
void SelectRadarProduct(common::RadarProductGroup group,
|
||||
const std::string& product,
|
||||
std::int16_t productCode = 0,
|
||||
std::chrono::system_clock::time_point time = {});
|
||||
std::int16_t productCode = 0,
|
||||
std::chrono::system_clock::time_point time = {},
|
||||
bool update = true);
|
||||
|
||||
void SelectRadarProduct(std::shared_ptr<types::RadarProductRecord> record);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue