diff --git a/scwx-qt/source/scwx/qt/manager/text_event_manager.cpp b/scwx-qt/source/scwx/qt/manager/text_event_manager.cpp index b3d0fd3a..bac8b0e7 100644 --- a/scwx-qt/source/scwx/qt/manager/text_event_manager.cpp +++ b/scwx-qt/source/scwx/qt/manager/text_event_manager.cpp @@ -119,6 +119,7 @@ public: std::chrono::hours loadHistoryDuration_ {kInitialLoadHistoryDuration_}; std::chrono::sys_time prevLoadTime_ {}; + std::chrono::sys_days archiveLimit_ {}; std::mutex archiveMutex_ {}; std::list archiveDates_ {}; @@ -215,7 +216,11 @@ void TextEventManager::SelectTime( for (auto& date : dates) { - p->LoadArchives(date); + if (p->archiveLimit_ == std::chrono::sys_days {} || + date < p->archiveLimit_) + { + p->LoadArchives(date); + } } } @@ -399,6 +404,11 @@ void TextEventManager::Impl::Refresh() startTime = std::min(startTime, prevLoadTime_); } + if (archiveLimit_ == std::chrono::sys_days {}) + { + archiveLimit_ = std::chrono::ceil(startTime); + } + auto updatedFiles = warningsProvider->LoadUpdatedFiles(startTime); // Store the load time and reset the load history duration