Timeline step begin and end

This commit is contained in:
Dan Paulat 2023-05-26 17:12:12 -05:00
parent 5f97718469
commit 1479525c4a

View file

@ -131,6 +131,18 @@ void TimelineManager::SetLoopSpeed(double loopSpeed)
void TimelineManager::AnimationStepBegin() void TimelineManager::AnimationStepBegin()
{ {
logger_->debug("AnimationStepBegin"); logger_->debug("AnimationStepBegin");
if (p->viewType_ == types::MapTime::Live ||
p->pinnedTime_ == std::chrono::system_clock::time_point {})
{
// If the selected view type is live, select the current products
p->SelectTime(std::chrono::system_clock::now() - p->loopTime_);
}
else
{
// If the selected view type is archive, select using the pinned time
p->SelectTime(p->pinnedTime_ - p->loopTime_);
}
} }
void TimelineManager::AnimationStepBack() void TimelineManager::AnimationStepBack()
@ -160,6 +172,17 @@ void TimelineManager::AnimationStepNext()
void TimelineManager::AnimationStepEnd() void TimelineManager::AnimationStepEnd()
{ {
logger_->debug("AnimationStepEnd"); logger_->debug("AnimationStepEnd");
if (p->viewType_ == types::MapTime::Live)
{
// If the selected view type is live, select the current products
p->SelectTime();
}
else
{
// If the selected view type is archive, select using the pinned time
p->SelectTime(p->pinnedTime_);
}
} }
void TimelineManager::Impl::SelectTime( void TimelineManager::Impl::SelectTime(