diff --git a/scwx-qt/source/scwx/qt/manager/timeline_manager.cpp b/scwx-qt/source/scwx/qt/manager/timeline_manager.cpp index f0c95e53..0bcf4f68 100644 --- a/scwx-qt/source/scwx/qt/manager/timeline_manager.cpp +++ b/scwx-qt/source/scwx/qt/manager/timeline_manager.cpp @@ -112,6 +112,11 @@ public: TimelineManager::TimelineManager() : p(std::make_unique(this)) {} TimelineManager::~TimelineManager() = default; +std::chrono::system_clock::time_point TimelineManager::GetSelectedTime() const +{ + return p->selectedTime_; +} + void TimelineManager::SetMapCount(std::size_t mapCount) { p->mapCount_ = mapCount; diff --git a/scwx-qt/source/scwx/qt/manager/timeline_manager.hpp b/scwx-qt/source/scwx/qt/manager/timeline_manager.hpp index 1a4154ac..bbff19f4 100644 --- a/scwx-qt/source/scwx/qt/manager/timeline_manager.hpp +++ b/scwx-qt/source/scwx/qt/manager/timeline_manager.hpp @@ -24,6 +24,8 @@ public: static std::shared_ptr Instance(); + std::chrono::system_clock::time_point GetSelectedTime() const; + void SetMapCount(std::size_t mapCount); public slots: diff --git a/scwx-qt/source/scwx/qt/map/alert_layer.cpp b/scwx-qt/source/scwx/qt/map/alert_layer.cpp index b0dafcfc..e6d731be 100644 --- a/scwx-qt/source/scwx/qt/map/alert_layer.cpp +++ b/scwx-qt/source/scwx/qt/map/alert_layer.cpp @@ -268,6 +268,8 @@ void AlertLayer::Initialize() auto& alertLayerHandler = AlertLayerHandler::Instance(); + p->selectedTime_ = manager::TimelineManager::Instance()->GetSelectedTime(); + // Take a shared lock to prevent handling additional alerts while populating // initial lists std::shared_lock lock {alertLayerHandler.alertMutex_}; diff --git a/scwx-qt/source/scwx/qt/map/placefile_layer.cpp b/scwx-qt/source/scwx/qt/map/placefile_layer.cpp index df9828eb..dcead2a1 100644 --- a/scwx-qt/source/scwx/qt/map/placefile_layer.cpp +++ b/scwx-qt/source/scwx/qt/map/placefile_layer.cpp @@ -122,6 +122,8 @@ void PlacefileLayer::Initialize() logger_->debug("Initialize()"); DrawLayer::Initialize(); + + p->selectedTime_ = manager::TimelineManager::Instance()->GetSelectedTime(); } void PlacefileLayer::Render(