mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 17:50:04 +00:00
Ensure proper level 2 data gets selected after file is reloaded
This commit is contained in:
parent
f1e35532b9
commit
d209ce97ea
1 changed files with 3 additions and 13 deletions
|
|
@ -182,12 +182,9 @@ void Level2ProductView::ConnectRadarProductManager()
|
|||
[this](std::shared_ptr<types::RadarProductRecord> record)
|
||||
{
|
||||
if (record->radar_product_group() ==
|
||||
common::RadarProductGroup::Level2 &&
|
||||
std::chrono::floor<std::chrono::seconds>(record->time()) ==
|
||||
selected_time())
|
||||
common::RadarProductGroup::Level2)
|
||||
{
|
||||
// If the data associated with the currently selected time is
|
||||
// reloaded, update the view
|
||||
// If level 2 data associated was reloaded, update the view
|
||||
Update();
|
||||
}
|
||||
});
|
||||
|
|
@ -517,17 +514,10 @@ void Level2ProductView::ComputeSweep()
|
|||
|
||||
std::shared_ptr<wsr88d::rda::ElevationScan> radarData;
|
||||
std::chrono::system_clock::time_point requestedTime {selected_time()};
|
||||
std::chrono::system_clock::time_point foundTime;
|
||||
std::tie(radarData, p->elevationCut_, p->elevationCuts_, foundTime) =
|
||||
std::tie(radarData, p->elevationCut_, p->elevationCuts_, std::ignore) =
|
||||
radarProductManager->GetLevel2Data(
|
||||
p->dataBlockType_, p->selectedElevation_, requestedTime);
|
||||
|
||||
// If a different time was found than what was requested, update it
|
||||
if (requestedTime != foundTime)
|
||||
{
|
||||
SelectTime(foundTime);
|
||||
}
|
||||
|
||||
if (radarData == nullptr)
|
||||
{
|
||||
Q_EMIT SweepNotComputed(types::NoUpdateReason::NotLoaded);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue