Skip to content

Commit

Permalink
Always add an extra timeframe to not miss events ON the end
Browse files Browse the repository at this point in the history
This fixes for example: qgis#48942
  • Loading branch information
rduivenvoorde committed Dec 18, 2023
1 parent e35193a commit d982a2d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/qgstemporalnavigationobject.cpp
Expand Up @@ -346,7 +346,8 @@ long long QgsTemporalNavigationObject::totalFrameCount() const
else
{
const QgsInterval totalAnimationLength = mTemporalExtents.end() - mTemporalExtents.begin();
return static_cast< long long >( std::ceil( totalAnimationLength.seconds() / mFrameDuration.seconds() ) );
// because we do not know if there is an (instantaneous) event ON mTemporalExtents.end() we always +1 here
return static_cast< long long >( std::ceil( totalAnimationLength.seconds() / mFrameDuration.seconds() ) + 1 );
}
}

Expand Down

0 comments on commit d982a2d

Please sign in to comment.