Skip to content
Permalink
Browse files

Upping the loop to 100 (else miss with month->days)

  • Loading branch information
rduivenvoorde authored and nyalldawson committed Feb 12, 2021
1 parent d096ef2 commit 73efd1ac6442df0ad9ce29a08caf58b9bbb06401
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/qgstemporalnavigationobject.cpp
@@ -321,7 +321,7 @@ long long QgsTemporalNavigationObject::findBestFrameNumberForFrameStart( const Q
// because of the 'fluidity' of the DateTime units (notable months and years), there seems to be a theoretical chance
// to overshoot. So in that case fail and return to startFrame (so max number of loops is just 10)
long long roughFrameStart = std::floor( ( frameStart - mTemporalExtents.begin() ).seconds() / mFrameDuration.seconds() );
for ( long long i = roughFrameStart; i < roughFrameStart + 10; ++i )
for ( long long i = roughFrameStart; i < roughFrameStart + 100; ++i )
{
QgsDateTimeRange range = dateTimeRangeForFrameNumber( i );
if ( range.overlaps( testFrame ) )

0 comments on commit 73efd1a

Please sign in to comment.