mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 21:20:06 +00:00
Fix stale storm tracking information logic to use selected time
This commit is contained in:
parent
925f91995a
commit
6eb9caf819
1 changed files with 62 additions and 61 deletions
|
|
@ -137,7 +137,8 @@ void OverlayProductView::Impl::LoadProduct(
|
|||
|
||||
if (autoUpdate)
|
||||
{
|
||||
connect(request.get(),
|
||||
connect(
|
||||
request.get(),
|
||||
&request::NexradFileRequest::RequestComplete,
|
||||
self_,
|
||||
[=, this](std::shared_ptr<request::NexradFileRequest> request)
|
||||
|
|
@ -155,14 +156,14 @@ void OverlayProductView::Impl::LoadProduct(
|
|||
if (level3File != nullptr)
|
||||
{
|
||||
const auto& header = level3File->message()->header();
|
||||
productTime =
|
||||
util::TimePoint(header.date_of_message(),
|
||||
header.time_of_message() * 1000);
|
||||
productTime = util::TimePoint(
|
||||
header.date_of_message(), header.time_of_message() * 1000);
|
||||
}
|
||||
|
||||
// If the record is from the last 30 minutes
|
||||
if (productTime + 30min >= time ||
|
||||
productTime + 30min >= std::chrono::system_clock::now())
|
||||
if (productTime + 30min >= std::chrono::system_clock::now() ||
|
||||
(selectedTime_ != std::chrono::system_clock::time_point {} &&
|
||||
productTime + 30min >= selectedTime_))
|
||||
{
|
||||
// Store loaded record
|
||||
std::unique_lock lock {recordMutex_};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue